<!--低频作业指导书板块：新页面，每一个视频是分开的-->

<!--用户权限说明-->
<!--管理员：代码：1，可以做所有的操作-->
<!--问题编辑人员：代码：2，可以做问题的修改操作-->
<template>
  <div style="margin: 0;padding: 0">
    <el-container>
      <!--页面表头设计-->
      <el-header style="height: 7vh">
        <el-link class="headMain" href="http://10.255.96.48:3404/">{{main.qualityManagementSystem}}</el-link>
        <span class="center-text">{{main.workInstructions}}</span>
        <el-popover
            placement="top-start"
            title="用户信息"
            width="200"
            trigger="hover">
          <div style="margin-top: 10px">Name：{{useName}}</div>
          <div style="margin-top: 10px">ID:{{useId}}</div>
          <div style="margin-top: 10px" @click="logOut"><el-link>退出</el-link></div>
          <div class="headMain" slot="reference">{{useName}}</div>
        </el-popover>
      </el-header>
      <el-container>
        <el-aside width="200px" style="height: 90vh">
          <div>
            <el-card class="box-card">
              <div slot="header" class="clearfix" style="text-align: left">
                <span>{{main.selectionPrompt}}</span>
              </div>
              <div style="text-align: left">
                {{main.underThisProjectThereAre}}{{tableData.length}}{{main.records}}
              </div>
            </el-card>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(1)" :style="background1">{{main.toolReplacement}}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(2)" :style="background2">{{ main.changeover }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(3)" :style="background3">{{ main.equipmentOperating }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(4)" :style="background4">{{ main.fixtureCheck }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(10)" :style="background10">{{ main.fixtureCalibration }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(5)" :style="background5">{{ main.operationCheck }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(6)" :style="background6">{{ main.measuringToolsCheck }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(7)" :style="background7">{{ main.alarmReleaseCheck }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(8)" :style="background8">{{ main.inspectionJudgment }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(9)" :style="background9">{{ main.pokaYoke }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(11)" :style="background11">{{ main.sampleTesting }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(12)" :style="background12">{{ main.equipmentInspection }}</el-button>
          </div>
          <div style="margin-top: 10px">
            <el-button style="width: 100%" @click="typeTable(13)" :style="background13">{{ main.equipmentMaintenance }}</el-button>
          </div>
        </el-aside>
        <el-container>
          <!--主题设计-->
          <el-main style="height: 82vh;overflow-y: auto;overflow-x: auto">
            <div style="display: flex;height: 75vh;margin-top: 10px">
              <div style="width: 220px; border: 1px solid blue; box-sizing: border-box;overflow-y: auto">
                <div style="margin-top: 10px;text-align: center">
                  <span style="color: red;font-size: 18px">{{main.information}}</span>
                  <el-link style="margin-left: 10px" @click="editTable(1)" v-if="usePower===1 && typeTableUse!==7"><i class="el-icon-circle-plus-outline"></i></el-link>
                  <el-link style="margin-left: 10px" @click="editTable(2)" v-if="usePower===1"><i class="el-icon-edit"></i></el-link>
                  <el-link style="margin-left: 10px" @click="editTable(3)" v-if="usePower===1"><i class="el-icon-delete"></i></el-link>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                      <span v-if="tableDataTemp.lineName===''"></span>
                  <span v-else-if="languageS==='chinese'">{{main.line}}{{tableDataTemp.lineName.split('/')[0]}}</span>
                  <span v-else-if="languageS==='english'">{{main.line}}{{tableDataTemp.lineName.split('/')[1]}}</span>
                  <span v-else-if="languageS==='russian'">{{main.line}}{{tableDataTemp.lineName.split('/')[2]}}</span>
                  <hr>
                </div>
                <div style="margin:8px;text-align: left">
                  <span>{{main.op}}{{tableDataTemp.op}}</span>
                  <hr>
                </div>
                <div style="margin:8px;width: 150px">
                  <div v-if="tableDataTemp.fileName===''"></div>
                  <div style="color: #0269fa;font-size: 18px;white-space: normal; overflow-wrap: break-word;"
                        v-else-if="languageS==='chinese' && tableDataTemp.fileName.split('|*|').length===3">{{tableDataTemp.fileName.split('|*|')[0]}}</div>
                  <div style="color: #0269fa;font-size: 18px;white-space: normal; overflow-wrap: break-word;"
                       v-else-if="languageS==='english' && tableDataTemp.fileName.split('|*|').length===3">{{tableDataTemp.fileName.split('|*|')[1]}}</div>
                  <div style="color: #0269fa;font-size: 18px;white-space: normal; overflow-wrap: break-word;"
                       v-else-if="languageS==='russian' && tableDataTemp.fileName.split('|*|').length===3">{{tableDataTemp.fileName.split('|*|')[2]}}</div>
                  <div style="color: #0269fa;font-size: 18px;white-space: normal; overflow-wrap: break-word;"
                       v-else>{{tableDataTemp.fileName}}</div>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.verNoLatest}}</span>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span >{{main.dateOfPreparation}}</span>
                  <span>{{tableDataTemp.writeDate}}</span>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.implementationDate}}</span>
                  <span>{{tableDataTemp.executeDate}}</span>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.documentNo}}</span>
                  <span>{{tableDataTemp.fileNum}}</span>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.preparedBy}}</span>
                  <span>{{tableDataTemp.writeUse}}</span>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.checked}}</span>
                  <el-link @click="documentReview(1,tableDataTemp.examineUse)">{{tableDataTemp.examineUse}}</el-link>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.countersigned}}</span>
                  <el-link @click="documentReview(2,tableDataTemp.countersignUse)">{{tableDataTemp.countersignUse}}</el-link>
                  <hr>
                </div>
                <div style="margin: 8px;text-align: left">
                  <span>{{main.approve}}</span>
                  <el-link @click="documentReview(3,tableDataTemp.ratifyUse)">{{tableDataTemp.ratifyUse}}</el-link>
                  <hr>
                </div>
              </div>
              <div style="flex-grow: 1;
                  border: 1px solid blue;
                  box-sizing: border-box;
                  margin-left: 8px;
                  padding: 8px;
                  display: flex;
                  width: 100%">
                <div style="flex: 1;scroll-margin-right: 8px; border: 1px solid #d3d3d3;">
                  <div style="text-align: left;margin-left: 8px;margin-bottom: 5px;margin-top: 5px">
                    <el-link :style="{marginRight:'5px',backgroundColor:workBookHeard1 , color:workBookHeardColour1, padding: '4px 10px', borderRadius: '5px' }"
                             @click="workBookHeard(1)" style="margin-left: 8px">{{main.instruction}}</el-link>
                    <span>|</span>
                    <el-link :style="{marginRight:'5px',backgroundColor:workBookHeard2 , color:workBookHeardColour2, padding: '4px 10px', borderRadius: '5px' }"
                             @click="workBookHeard(2)">{{main.manHour}}</el-link>
                    <span>|</span>
                    <el-link :style="{marginRight:'5px',backgroundColor:workBookHeard3 , color:workBookHeardColour3, padding: '4px 10px', borderRadius: '5px' }"
                             @click="workBookHeard(3)">{{main.operator}}</el-link>
                  </div>
                  <hr>
                  <div v-if="workBookHeardUse===1">
                    <el-table
                        :data="workBook"
                        border
                        style="width: 100%"
                        height="65vh"
                        @row-click="workBookRowClick"
                        :row-style="workBookRowClassName">
                      <el-table-column
                          type="expand"
                          v-slot:default="props">
                        <div style="margin-right: 10px;margin-left: 20px">
                          <span>{{pageVal.attentionPointsExplanation}}</span>
                          <span v-if="languageS==='chinese' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[0]"></span>
                          <span v-else-if="languageS==='english' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[1]"></span>
                          <span v-else-if="languageS==='russian' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[2]"></span>
                          <span v-else>{{props.row.problem}}</span>
                        </div>
                        <div style="margin-right: 10px;margin-left: 20px" v-if="typeTableUse===4 || typeTableUse===12">
                          <span>{{pageVal.measurement_technique}}</span>
                          <span v-if="props.row.measurementTechnique===''|| props.row.measurementTechnique===undefined || props.row.measurementTechnique===null|| props.row.measurementTechnique==='undefined'" ></span>
                          <span v-else-if="languageS==='chinese' && props.row.measurementTechnique.split('/').length===3" v-html="props.row.measurementTechnique.split('/')[0]"></span>
                          <span v-else-if="languageS==='english' && props.row.measurementTechnique.split('/').length===3" v-html="props.row.measurementTechnique.split('/')[1]"></span>
                          <span v-else-if="languageS==='russian' && props.row.measurementTechnique.split('/').length===3" v-html="props.row.measurementTechnique.split('/')[2]"></span>
                          <span v-else>{{props.row.measurementTechnique}}</span>
                        </div>
                        <div style="margin-right: 10px;margin-left: 20px" v-if="typeTableUse===4 || typeTableUse===12">
                          <span>{{pageVal.cycle}}</span>
                          <span v-if="props.row.cycle===''|| props.row.cycle===undefined || props.row.cycle===null|| props.row.cycle==='undefined'"></span>
                          <span v-else-if="languageS==='chinese' && props.row.cycle.split('/').length===3" v-html="props.row.cycle.split('/')[0]"></span>
                          <span v-else-if="languageS==='english' && props.row.cycle.split('/').length===3" v-html="props.row.cycle.split('/')[1]"></span>
                          <span v-else-if="languageS==='russian' && props.row.cycle.split('/').length===3" v-html="props.row.cycle.split('/')[2]"></span>
                          <span v-else>{{props.row.cycle}}</span>
                        </div>
                      </el-table-column>
                      <el-table-column
                          v-slot:default="scope"
                          :label="main.serialNo"
                          width="50">
                        {{scope.$index+1}}
                        <el-link @click="editBook(2,scope)" v-if="usePower===1"><i class="el-icon-download"></i></el-link>
                      </el-table-column>
                      <el-table-column
                          prop="work"
                          :label="main.content"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.work}}</span>
                        <el-link style="margin-left: 20px" @click="editBook(1,scope)" v-if="usePower===1"><i class="el-icon-edit"></i></el-link>
                        <el-link style="margin-left: 10px" @click="editBook(4,scope)" v-if="usePower===1"><i class="el-icon-picture-outline"></i></el-link>
                        <el-link style="margin-left: 10px" @click="editBook(5,scope)" v-if="usePower===1"><i class="el-icon-video-camera"></i></el-link>
                        <el-link style="margin-left: 10px" @click="editBook(3,scope)" v-if="usePower===1"><i class="el-icon-delete"></i></el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                  <div v-if="workBookHeardUse===2" ref="myChartBor" style="height: 66vh;width:35vw">
                  </div>
                  <div v-if="workBookHeardUse===3">
                    <div style="margin-bottom: 5px;text-align: right">
                      <el-link @click="operatorListEditShow(1,null)" style="margin-right: 5px"><i class="el-icon-download"></i></el-link>
                    </div>
                    <el-table
                        :data="operatorList"
                        border
                        style="width: 100%"
                        height="65vh"
                        @row-click="operatorRowClick">
                      <el-table-column
                          type="expand"
                          v-slot:default="props">
                        <div>
                          <div>
                            <span>指导人：</span><span>{{props.row.mentor}}</span>
                          </div>
                          <div>
                            <span>等级：</span><span>{{props.row.skill_level}}</span>
                          </div>
                        </div>
                      </el-table-column>
                      <el-table-column
                          :label="pageVal.order"
                          prop="id"
                          width="50">
                      </el-table-column>
                      <el-table-column
                          prop="operator_id"
                          :label="pageVal.employeeId">
                      </el-table-column>
                      <el-table-column
                          prop="operator_name"
                          :label="pageVal.name">
                      </el-table-column>
                      <el-table-column
                          prop="star_time"
                          :label="pageVal.startDate">
                      </el-table-column>
                      <el-table-column
                          :label="pageVal.edit"
                          v-slot:default="scope">
                        <el-link @click="operatorListEditShow(2,scope)" style="margin-right: 5px"><i class="el-icon-edit"></i></el-link>
                        <el-link @click="deleteData('operatorRowDeleteData',scope)" style="margin-right: 5px"><i class="el-icon-delete"></i></el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </div>
                <div style="flex: 1;border: 1px solid #d3d3d3;">
                  <div style="text-align: left;margin-left: 8px;margin-bottom: 5px;margin-top: 5px">
                    <el-link
                        type="primary"
                        @click="switchVideo(1)"
                        :style="{ backgroundColor:videoAndImage1 , color:videoAndImageColor1 , padding: '4px 10px', borderRadius: '5px' }">{{main.picture}}</el-link>
                    <el-link
                        type="primary"
                        style="margin-left: 20px"
                        @click="switchVideo(2)"
                        :style="{ backgroundColor:videoAndImage2 , color:videoAndImageColor2 , padding: '4px 10px', borderRadius: '5px' }">{{main.video}}</el-link>
                    <el-link
                        type="primary"
                        style="margin-left: 20px"
                        @click="switchVideo(3)"
                        :style="{ backgroundColor:videoAndImage3 , color:videoAndImageColor3 , padding: '4px 10px', borderRadius: '5px' }">PFMEA</el-link>
                  </div>
                  <hr>
                  <div style="height: 62vh;margin-top: 8px">
                    <div class="block" v-if="switchVideoUse===1">
                      <el-carousel trigger="click" height="62vh">
                        <el-carousel-item v-for="(item, index) in itemView" :key="index">
                          <el-image
                              style="width: 100%; height: 100%"
                              :src="item"
                              fit='contain'
                              @click="handleImageClick(item)"></el-image>
                          <el-link></el-link>
                        </el-carousel-item>
                      </el-carousel>
                    </div>
                    <div class="block" v-else-if="switchVideoUse===2" style="height: 100%">
                      <el-carousel trigger="click" height="62vh" :autoplay="false">
                        <el-carousel-item v-for="(item, index) in itemViewVideo" :key="index">
                          <video
                              style="width: 100%; height: 100%"
                              :src="item"
                              controls></video>
                        </el-carousel-item>
                      </el-carousel>
                    </div>
                    <div class="block" v-else-if="switchVideoUse===3" style="width: 30%; overflow-x: auto"> <!-- 修改overflow-x为auto -->
                      <el-table
                          :data="pfmea"
                          border
                          height="65vh">
                        <el-table-column prop="process_step" label="过程步骤" />
                        <el-table-column prop="function_description" label="功能" />
                      </el-table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </el-main>
          <el-footer style="height: 8vh">
            <el-button plain size="mini" @click="chooseLanguage('chinese')">中  文</el-button>
            <el-button plain size="mini" @click="chooseLanguage('russian')">Русский язык</el-button>
            <el-button plain size="mini" @click="chooseLanguage('english')">English</el-button>
          </el-footer>
        </el-container>
      </el-container>
    </el-container>
    <!--删除提醒的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="deleteDialog"
        width="400px"
        :before-close="handleClose">
      <span>{{main.sureToDelete}}</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteDialog = false" size="mini">{{main.cancel}}</el-button>
        <el-button type="primary" size="mini" @click="deleteDataOk">{{main.ok}}</el-button>
      </span>
    </el-dialog>
    <!--弹窗放置区-->
    <!--低频作业指导书表头编辑的弹窗，通用的工序-->
    <el-dialog
        :title="titleUse"
        :visible.sync="dialogTableHeader"
        width="40%"
        :before-close="handleClose">
      <el-form ref="formTableData" status-icon :rules="rulesForm" :model="formTableData" label-width="125px">
        <el-form-item :label="pageVal.workshop" prop="workshop">
          <el-select v-model="formTableData.workshop" :placeholder="pageVal.select" style="width: 100%" @change="(val) => selectChange(val, 1)">
            <el-option
                v-for="item in optionWorkshop"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.lineName" prop="lineName">
          <el-select
              v-model="formTableData.lineName"
              :placeholder="pageVal.select"
              style="width: 100%"
              :disabled="disabledLineName">
            <el-option
                v-for="item in optionLine"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.op" style="flex:1" prop="op">
            <el-select
                v-model="formTableData.op"
                :placeholder="pageVal.select"
                style="width: 100%"
                :disabled="disabledOp">
              <el-option
                  v-for="item in optionOp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item  :label="pageVal.editionNum" style="flex:1" prop="editionNum">
            <el-select
                v-model="formTableData.editionNum"
                :placeholder="pageVal.select"
                style="width: 100%">
              <el-option
                  v-for="item in optionEditionNum"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <el-form-item :label="pageVal.fileName" prop="fileName">
          <el-input
              type="textarea"
              :rows="2"
              :placeholder="pageVal.seperate"
              v-model="formTableData.fileName">
          </el-input>
        </el-form-item>
        <el-form-item :label="pageVal.writeDate" prop="writeDate">
          <el-date-picker
              v-model="formTableData.writeDate"
              type="date"
              :placeholder="pageVal.dateSelect"
              style="width: 100%">
          </el-date-picker>
        </el-form-item>
        <el-form-item :label="pageVal.executeDate" prop="executeDate">
          <el-date-picker
              v-model="formTableData.executeDate"
              type="date"
              :placeholder="pageVal.dateSelect"
              style="width: 100%">
          </el-date-picker>
        </el-form-item>
        <div style="font-size: 18px;color: #0269fa;margin-bottom: 10px">{{pageVal.designateRelevantPersonnel}}</div>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.writeUse" style="flex:1" prop="writeUse">
            <el-input  :placeholder="useName" disabled="disabled"></el-input>
          </el-form-item>
          <el-form-item  :label="pageVal.examineUse" style="flex:1" prop="examineUse">
            <el-input v-model="formTableData.examineUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
        </div>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.countersignUse" style="flex:1" prop="countersignUse">
            <el-input v-model="formTableData.countersignUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
          <el-form-item  :label="pageVal.ratifyUse" style="flex:1" prop="ratifyUse">
            <el-input v-model="formTableData.ratifyUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
        </div>
        <el-form-item :label="pageVal.submitResult">
          <el-button type="primary" @click="onSubmit(editTableUse,'formTableData')">{{pageVal.create}}</el-button>
          <el-button @click="dialogTableHeader=false">{{pageVal.cancel}}</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!--低频作业指导书表头编辑的弹窗，用在报警解除上-->
    <el-dialog
        :title="titleUse"
        :visible.sync="alarmCanceledDialog"
        width="40%"
        :before-close="handleClose">
      <el-form ref="formTableData" status-icon :rules="rulesForm" :model="formTableData" label-width="125px">
        <el-form-item :label="pageVal.workshop" prop="workshop">
          <el-select v-model="formTableData.workshop" :placeholder="pageVal.select" style="width: 100%" @change="(val) => selectChange(val, 1)">
            <el-option
                v-for="item in optionWorkshop"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.lineName" prop="lineName">
          <el-select
              v-model="formTableData.lineName"
              :placeholder="pageVal.select"
              style="width: 100%"
              :disabled="disabledLineName">
            <el-option
                v-for="item in optionLine"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.op" style="flex:1" prop="op">
            <el-select
                v-model="formTableData.op"
                :placeholder="pageVal.select"
                style="width: 100%"
                :disabled="disabledOp">
              <el-option
                  v-for="item in optionOp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item  :label="pageVal.editionNum" style="flex:1" prop="editionNum">
            <el-select
                v-model="formTableData.editionNum"
                :placeholder="pageVal.select"
                style="width: 100%">
              <el-option
                  v-for="item in optionEditionNum"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <el-form-item :label="pageVal.fileName" prop="fileName">
          <!--选择器,选择文件报警信息-->
          <el-input
              type="textarea"
              :rows="2"
              :placeholder="pageVal.seperate"
              v-model="formTableData.fileName">
          </el-input>
        </el-form-item>
        <el-form-item :label="pageVal.writeDate" prop="writeDate">
          <el-date-picker
              v-model="formTableData.writeDate"
              type="date"
              :placeholder="pageVal.dateSelect"
              style="width: 100%">
          </el-date-picker>
        </el-form-item>
        <el-form-item :label="pageVal.executeDate" prop="executeDate">
          <el-date-picker
              v-model="formTableData.executeDate"
              type="date"
              :placeholder="pageVal.dateSelect"
              style="width: 100%">
          </el-date-picker>
        </el-form-item>
        <div style="font-size: 18px;color: #0269fa;margin-bottom: 10px">{{pageVal.designateRelevantPersonnel}}</div>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.writeUse" style="flex:1" prop="writeUse">
            <el-input  :placeholder="useName" disabled="disabled"></el-input>
          </el-form-item>
          <el-form-item  :label="pageVal.examineUse" style="flex:1" prop="examineUse">
            <el-input v-model="formTableData.examineUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
        </div>
        <div style="display: flex; /* 启用 Flexbox 布局 */justify-content: space-between; /* 子元素之间的间隔平均分布 */  ">
          <el-form-item :label="pageVal.countersignUse" style="flex:1" prop="countersignUse">
            <el-input v-model="formTableData.countersignUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
          <el-form-item  :label="pageVal.ratifyUse" style="flex:1" prop="ratifyUse">
            <el-input v-model="formTableData.ratifyUse" :placeholder="pageVal.enter"></el-input>
          </el-form-item>
        </div>
        <el-form-item :label="pageVal.submitResult">
          <el-button type="primary" @click="onSubmit(editTableUse,'formTableData')">{{pageVal.create}}</el-button>
          <el-button @click="dialogTableHeader=false">{{pageVal.cancel}}</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!--输入两个文本的弹窗类型-->
    <el-dialog
        :title="titleUse"
        :visible.sync="dialogVisibleText"
        width="50%"
        :before-close="handleClose">
      <div style="text-align: left">
        <div v-loading="work_step_loading">
          <el-tabs v-model="work_step_tab" type="card">
            <el-tab-pane label="中文" name="chinese">
              <span style="font-size: 18px">{{pageVal.prompt1}}</span>
              <el-input :placeholder="pageVal.enter"
                        v-model="inputText1"
                        style="width: 100%;margin-top: 8px"
                        type="textarea"
                        :rows="2"></el-input>
            </el-tab-pane>
            <el-tab-pane label="English" name="english">
              <span style="font-size: 18px">{{pageVal.prompt1}}</span>
              <el-input :placeholder="pageVal.enter"
                        v-model="inputTextEnglish1"
                        style="width: 100%;margin-top: 8px"
                        type="textarea"
                        :rows="2"></el-input>
            </el-tab-pane>
            <el-tab-pane label="Русский язык" name="russian">
              <span style="font-size: 18px">{{pageVal.prompt1}}</span>
              <el-input :placeholder="pageVal.enter"
                        v-model="inputTextRussian1"
                        class="russian-input"
                        style="width: 100%;margin-top: 8px"
                        type="textarea"
                        :rows="2"></el-input>
            </el-tab-pane>
          </el-tabs>
        </div>
        <div style="margin-top: 10px;text-align: right">
          <el-button @click="translate(1)">自动翻译|Automatic Translation|Автоматический перевод</el-button>
        </div>
      </div>
      <div style="margin-top: 10px;text-align: left">
        <span style="font-size: 18px">{{pageVal.prompt2}}</span>
        <div v-loading="work_problem_loading">
          <el-tabs v-model="pointsActiveTab" type="card" style="margin-top: 8px">
            <el-tab-pane label="中文" name="chinese">
              <div ref="pointsChineseEditor" class="editor-container"></div>
            </el-tab-pane>
            <el-tab-pane label="English" name="english">
              <div ref="pointsEnglishEditor" class="editor-container"></div>
            </el-tab-pane>
            <el-tab-pane label="Русский язык" name="russian">
              <div ref="pointsRussianEditor" class="editor-container"></div>
            </el-tab-pane>
          </el-tabs>
        </div>
        <div>
          <div style="margin-top: 10px;text-align: right">
            <el-button @click="translate(2)">自动翻译|Automatic Translation|Автоматический перевод</el-button>
          </div>
        </div>
      </div>
      <div style="float:left; text-align: left;margin-top: 10px">
        <span style="margin-right: 20px;font-size: 18px">{{pageVal.workTime}}:</span><el-input-number v-model="inputNum" :min="0" :max="3600"></el-input-number>
      </div>
      <div style="float:left; text-align: left;margin-top: 15px" v-if="typeTableUse===4 || typeTableUse===12">
        <span style="margin-right: 20px;font-size: 18px">{{pageVal.measurement_technique}}</span>
        <el-select v-model="measurementTechnique" style="width: 180px; margin-right: 5px">
          <el-option label="目视/Visual Inspection/Визуальный осмотр" value="目视/Visual Inspection/Визуальный осмотр"></el-option>
          <el-option label="手触/Tactile Inspection/Тактильная проверка" value="手触/Tactile Inspection/Тактильная проверка"></el-option>
          <el-option label="目视|手触/Visual|Hand touch/Визуальное|Pучноеприкосновение" value="目视|手触/Visual|Hand touch/Визуальное|Pучноеприкосновение"></el-option>
          <el-option label="扳手/Wrench/Kлюч" value="扳手/Wrench/Kлюч"></el-option>
          <el-option label="验棒/Test bar/калибровочный прямой стержень" value="验棒/Test bar/калибровочный прямой стержень"></el-option>
          <el-option label="测量/Measurement/Измерение" value="测量/Measurement/Измерение"></el-option>
        </el-select>
        <span style="margin-right: 20px;font-size: 18px">{{pageVal.cycle}}</span>
        <el-select v-model="cycle" style="width: 180px">
          <el-option label="1shift" value="1shift"></el-option>
          <el-option label="1day" value="1day"></el-option>
          <el-option label="3days" value="3days"></el-option>
          <el-option label="1week" value="1week"></el-option>
          <el-option label="2weeks" value="2weeks"></el-option>
          <el-option label="1month" value="1month"></el-option>
          <el-option label="3months" value="3months"></el-option>
          <el-option label="6months" value="6months"></el-option>
          <el-option label="1year" value="1year"></el-option>
        </el-select>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisibleText = false" style="margin-top: 15px">{{main.cancel}}</el-button>
        <el-button type="primary" @click="saveDataTextTwo" style="margin-top: 15px">{{main.confirm}}</el-button>
      </span>
    </el-dialog>
    <!--点击上传照片-->
    <el-dialog
        :visible.sync="dialogPicture"
        :title="titleUse">
      <div style="margin-top: 10px;text-align: center; border: 1px solid #0269fa;padding: 10px">
        <el-upload
            action="http://10.255.96.48:3499/russiaEngine/"
            list-type="picture-card"
            :auto-upload="false"
            :on-change="(file, fileList) => saveFileAnnex(file, fileList)"
            :file-list="PictureList"
            :accept="fileType">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
                class="el-upload-list__item-thumbnail"
                :src="file.url" alt="">
            <span class="el-upload-list__item-actions">
              <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
              <i class="el-icon-zoom-in"></i>
            </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
              <i class="el-icon-download"></i>
            </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
              <i class="el-icon-delete"></i>
            </span>
            </span>
          </div>
        </el-upload>
      </div>
    </el-dialog>
    <!--点击上传视频-->
    <el-dialog
        :visible.sync="dialogVideo"
        :title="titleUse">
      <div style="margin-top: 10px;text-align: center; border: 1px solid #0269fa;padding: 10px">
        <el-upload
            action="http://10.255.96.48:3499/russiaEngine/"
            list-type="picture-card"
            :auto-upload="false"
            :on-change="(file, fileList) => saveFileAnnex(file, fileList)"
            :file-list="videoList"
            :accept="fileType"
            v-loading="loading"
            element-loading-text="拼命上传中">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <video width="100%"
                   height="100%"
                   :src="file.url"
                   controls>
            </video>
            <span class="el-upload-list__item-actions">
              <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
                <i class="el-icon-zoom-in"></i>
              </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
                <i class="el-icon-download"></i>
              </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
                <i class="el-icon-delete"></i>
              </span>
            </span>
          </div>
        </el-upload>
      </div>
    </el-dialog>
    <!--点击上传照片中的放大按钮，查看照片-->
    <el-dialog :visible.sync="dialogPictureAnnex">
      <img width="100%" :src="dialogImageUrl" alt="">
    </el-dialog>
    <!--用作对报警解除的作业指导书添加明细的弹窗-->
    <el-dialog :title="titleUse"
               :visible.sync="dialogExceptionAdd"
               width="80%"
               :before-close="handleClose">
        <el-table
          :data="plcAlarmSettingData"
          border
          style="width: 100%"
          height="70vh">
        <el-table-column
            prop="workShop"
            label="车间名称"
            width="150"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column
            prop="workArea"
            label="线体区域"
            width="90">
        </el-table-column>
        <el-table-column
            prop="stationID"
            label="工位名称"
            width="90">
        </el-table-column>
        <el-table-column
            prop="alarmInformationChinese"
            label="中文报警"
            width="280"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column
            prop="alarmInformationRussian"
            label="俄文报警"
            width="280"
            show-overflow-tooltip>
        </el-table-column>
        <el-table-column
            prop="alarmLevel"
            label="报警等级"
            width="80">
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
    <el-button @click="dialogExceptionAdd = false">{{main.cancel}}</el-button>
    <el-button type="primary" @click="exceptionAdd">{{main.confirm}}</el-button>
  </span>
    </el-dialog>
    <!--编辑操作人员信息的记录-->
    <el-dialog
        :title="titleUse"
        :visible.sync="operatorDialog"
        width="450px"
        :before-close="handleClose">
      <div style="margin-top: 10px;text-align: left">
        <el-form v-model="operatorListForm" label-width="150px">
          <el-form-item :label="pageVal.employeeId1">
            <el-input style="width: 200px" v-model="operatorListForm.operator_id"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.name1">
            <el-input style="width: 200px" v-model="operatorListForm.operator_name"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.startDate1">
            <el-date-picker
                v-model="operatorListForm.star_time"
                format="yyyy-MM-dd"
                value-format="yyyy-MM-dd"
                type="date"
                style="width: 200px"
                :placeholder="pageVal.selectTheDate">
            </el-date-picker>
          </el-form-item>
          <el-form-item :label="pageVal.assessmentLevel">
            <el-select v-model="operatorListForm.skill_level" clearable placeholder="请选择" style="width: 200px">
              <el-option
                  v-for="item in skill_level_options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.mentor">
            <el-input style="width: 200px" v-model="operatorListForm.mentor"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.uploadImage">
            <el-upload
                class="avatar-uploader"
                action=""
                :show-file-list="false"
                :auto-upload="false"
                :on-change="handleAvatarSuccess"
                :before-upload="beforeAvatarUpload">
              <img v-if="operatorListImageUrl" :src="operatorListImageUrl" class="avatar">
              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
    <el-button @click="operatorDialog = false">{{main.cancel}}</el-button>
    <el-button type="primary" @click="operatorListEdit">{{main.ok}}</el-button>
  </span>
    </el-dialog>

    <!--抽屉放置区域  -->
    <el-drawer
        :title="drawerTitle"
        :visible.sync="drawer"
        direction="rtl"
        size="55%">
<!--      <el-button size="mini" @click="refreshProject" v-if="this.typeTableUse===4 || typeTableUse===10">{{pageVal.refresh}}</el-button>-->
      <div style="padding: 0 25px 15px 25px; display: flex; align-items: center;">
        <span style="margin-right: 10px;">{{pageVal.searchFile}}</span>
        <el-input
            v-model="filterFileName"
            style="width: 300px; margin-right: 10px;"
            :placeholder="pageVal.inputFileName"
            @keyup.enter.native="handleSearch"
        size="small">  <!-- 添加回车搜索支持 -->
        </el-input>
        <el-button
            type="primary"
            size="small"
            icon="el-icon-search"
            @click="handleSearch">
          {{pageVal.search}}
        </el-button>
        <el-button
            size="small"
            @click="resetSearch"
            style="margin-left: 10px;">
          {{pageVal.reset}}
        </el-button>
      </div>
      <el-table
          :data="filterTableData"
          style="width: 100%;margin-left: 25px;margin-right: 25px"
          highlight-current-row="highlight-current-row">
        <el-table-column
            prop="workshop"
            :label="pageVal.workshop"
            sortable
            width="140"
            v-slot:default="scope">
          <div style="width: 100%" @click="tableDataClick(1,scope)">
            <span v-if="languageS==='chinese'">{{scope.row.workshop.split('/')[0]}}</span>
            <span v-else-if="languageS==='english'">{{scope.row.workshop.split('/')[1]}}</span>
            <span v-else-if="languageS==='russian'">{{scope.row.workshop.split('/')[2]}}</span>
          </div>
        </el-table-column>
        <el-table-column
            prop="lineName"
            :label="pageVal.lineName"
            sortable
            width="140"
            v-slot:default="scope">
          <div style="width: 100%" @click="tableDataClick(1,scope)">
            <span v-if="languageS==='chinese'">{{scope.row.lineName.split('/')[0]}}</span>
            <span v-else-if="languageS==='english'">{{scope.row.lineName.split('/')[1]}}</span>
            <span v-else-if="languageS==='russian'">{{scope.row.lineName.split('/')[2]}}</span>
          </div>
        </el-table-column>
        <el-table-column
            prop="op"
            :label="pageVal.op"
            sortable
            width="90"
            :formatter="formatter"
            v-slot="scope">
          <div style="width: 100%" @click="tableDataClick(1,scope)">
            {{scope.row.op}}
          </div>
        </el-table-column>
        <el-table-column
            prop="fileName"
            :label="pageVal.fileName"
            v-slot:default="scope">
          <div style="width: 100%" @click="tableDataClick(1,scope)">
            <span v-if="languageS==='chinese' && scope.row.fileName.split('|*|').length===3">{{scope.row.fileName.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.fileName.split('|*|').length===3">{{scope.row.fileName.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.fileName.split('|*|').length===3">{{scope.row.fileName.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.fileName}}</span>
          </div>
        </el-table-column>
      </el-table>
    </el-drawer>
  </div>
</template>

<script>

import {filepath, machiningAssembly, OpAssembly, optionWorkshop, workshopAssembly} from "@/configUse";
import _ from "lodash";
import * as echarts from "echarts";
import {translate_zh_en_ru} from "@/components/utils/useUtils";
import E from "wangeditor";

export default {
  name: "changeModel",
  components: {},
  data() {
    //校验数据是否为空
    var dataNull = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('数据不能为空，请输入/选择'));
      }
      callback();
    }

    return {
      //点击元素，转换颜色、背景的变量
      activeName:'first',
      //控制显示图片还是显示视频播放器的控件变量
      switchVideoUse:1,
      //抽屉相关的变量
      //抽屉的展示
      drawer: false,
      //抽屉的提示信息
      drawerTitle:'提示',

      //用户点击了选择的类型后，按钮调整颜色的变量
      background1: '',//换刀作业指导书背景色
      background2: '',//换型作业指导书
      background3: '',//机床操作说明书
      background4: '',//工装点检指导书
      background5: '',//标准作业检指导书
      background6: '',//量检具点检指导书
      background7: '',//报警解除指导书
      background8: '',//报警件判定指导书
      background9:'',//防错有效性验证指导书
      background10:'',//工装校准指导书
      background11:'',//样件测试指导书
      background12:'',//设备点检指导书
      background13:'',//设备保养指导书

      videoAndImage1:'',//图片的背景色
      videoAndImage2:'',//视频的背景色
      videoAndImage3:'',//修改记录背景色
      videoAndImageColor1:'',//图片的字体颜色
      videoAndImageColor2:'',//视频的字体颜色
      videoAndImageColor3:'',//修改记录背景设
      //用户权限相关的变量
      useName:'',//用户名称
      useId:'',//用户编号
      usePower:'',//用户权限
      //语言选择的变量
      languageS:'chinese',
      //
      main:{
        qualityManagementSystem:'俄动力质量管理系统',
        workInstructions:'低频作业指导书',
        sureToDelete:'确定删除吗？',//需要翻译
        toolReplacement:'换刀作业指导书',
        changeover:'换型作业指导书',
        equipmentOperating:'设备操作说明书',
        fixtureCheck:'工装点检指导书',
        fixtureCalibration:'工装校准指导书',
        operationCheck:'标准作业检查指导书',
        measuringToolsCheck:'量检具点检指导书',
        alarmReleaseCheck:'报警解除指导书',
        inspectionJudgment:'报警件判定指导书',
        pokaYoke:'防错有效性验证指导书',
        sampleTesting:'样件测试指导书',
        equipmentInspection:'设备点检指导书',
        equipmentMaintenance:'设备保养指导书',

        selectionPrompt:'选择提示：',
        underThisProjectThereAre:'该项目下有',
        records:'条记录',

        information:'表单信息',
        line:'线体名称：',
        op:'工序号：',
        verNoLatest:'版本号：最新',
        dateOfPreparation:'编制日期：',
        implementationDate:'执行日期：',
        documentNo:'文件编号：',
        preparedBy:'编制：',
        checked:'审核：',
        countersigned:'会签：',
        approve:'批准：',

        instruction:'要领书/指导书',
        manHour:'工时',
        operator:'操作人员',

        serialNo:'序号',
        content:'步骤内容',

        confirm:'确认',
        cancel:'取消',

        picture:'图片',
        video:'视频',
        ok:'确定'
      },
      pageVal:{
        refresh:'刷新',
        search:'搜索',
        reset:'重置',
        searchFile:'搜索文件名：',
        inputFileName:'请输入文件名称',
        workshop:'车间名称：',
        lineName:'线体名称：',
        op:'工序号：',
        editionNum:'版本号：',
        fileName:'文件名称：',
        writeDate:'编制日期：',
        executeDate:'执行日期：',
        designateRelevantPersonnel:'指定相关人员',
        writeUse:'编制人',
        examineUse:'审核人',
        countersignUse:'会签人',
        ratifyUse:'批准人',
        submitResult:'提交结果',
        create:'立即创建',
        cancel:'取消',
        select:'请选择',
        dateSelect:'请选择日期',
        enter:'请输入内容',
        seperate:'请输入内容,语言使用“|*|”符号分割',
        //文本弹窗窗口中，需要的输入提示
        prompt1:'步骤',
        prompt2:'注意点',
        workTime:'工步用时(单位s)',

        attentionPointsExplanation:'注意点说明：',
        measurement_technique:'评价/测量技术：',
        cycle:'周期：',
        employeeId:'工号',
        name:'姓名',
        startDate:'开始日期',

        //操作人员
        employeeId1:'工号：',
        name1:'姓名：',
        startDate1:'开始日期：',
        assessmentLevel:'考核等级：',
        mentor:'指导人：',
        uploadImage:'上传图片：',
      },

      //传输忙的变量
      loading:false,

      //用作作业指导书表头部分的选择
      workBookHeard1:'#0269fa',
      workBookHeard2:'',
      workBookHeard3:'',
      workBookHeardColour1:'white',
      workBookHeardColour2:'',
      workBookHeardColour3:'',

      //作业指导书的内容
      workBook:[
        {
          id:0,
          work:'请编辑',//工作步骤
          problem:'请输入',//关注点
          spendTime:0,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          measurementTechnique:'',//评价测量技术
          cycle:'',//周期
        }],
      //作业指导书的修改内容
      //修改人
      editUser:'',
      editData:'',
      //修改日期
      editRecord:[
        {
          id:0,
          work:'请编辑',//工作步骤
          problem:'请输入',//关注点
          spendTime:0,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
        }],
      //大表的内容
      tableData:[
        {
          //id主键
          id:'',
          //车间名称
          workshop:'',
          //线体名称
          lineName:'',
          //工序名称
          op:'',
          //文件名称
          fileName:'',
          // 版本号
          editionNum:'',
          //编制日期
          writeDate:'',
          //执行日期
          executeDate:'',
          //文件编号
          fileNum:'',
          //编制
          writeUse:'',
          //审核
          examineUse:'',
          //批准
          ratifyUse:'',
          //会签
          countersignUse:'',
          //作业指导书
          workBook:'',
          //图片附件
          bookImage:'',
          // 视频附件
          bookVideo:'',
          // 修改记录
          editRecord:'',
          //指导书类型
          bookType:'',
          //删除标记位
          deleteSign:'',
          //创建时间
          establishTime:'',
          //修改时间
          UpdateTime:'',
          //操作人员
          operator:'',
        }
      ],

      //画工时的直方图
      //画直方图
      chartUserBor:null,
      optionBor: {
        title: {
          text: '无信息',        // 主标题文本
          subtext:'',              //副标题
          left: 'center',         // 标题位置（left/center/right/数值）
          top: 'top',             // 标题垂直位置（top/center/bottom/数值）
          textStyle: {
            color: '#333',        // 标题颜色
            fontSize: 18,         // 标题字号
            fontWeight: 'bold'    // 字体粗细
          },
          subtextStyle: {
            color: '#aaa'         // 副标题样式
          }
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        grid: {
          top:'3%',
          left: '3%',
          right: '4%',
          bottom: '10%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'category',
            data: [],
            axisTick: {
              alignWithLabel: true
            }
          }
        ],
        yAxis: [
          {
            type: 'value'
          }
        ],
        series: [
          {
            name: 'Direct',
            type: 'bar',
            barWidth: '60%',
            data:[]
          }
        ]
      },

      //抽屉的搜索输入框
      filterFileName:'',
      //筛选抽屉大表
      filterTableData:[],

      //报警解除的大表数据
      plcAlarmSettingData: [
        {
          //主键
          id: 0,
          //车间的名称
          workShop: '',
          //工作区域 ==> 缸盖/内装 ，外装
          workArea: '',
          //工位名称
          stationID: '',
          //PLC的IP地址
          plcIPaddress: '',
          //PLC的DB数据块
          dbBlock: '',
          //PLC的DB块的字节
          dbByte: '',
          //PLC的DB块的位
          dbBit: '',
          //PLC中读取发动机号的设置地址
          partNumberDB: '',
          //PLC中读取到的报警代号
          alarmCode: '',
          //设定的报警文本信息-中文
          alarmInformationChinese: '',
          //设定的报警文本信息-俄文
          alarmInformationRussian: '',
          //设定的报警文本信息-英文
          alarmInformationEnglish: '',
          //报警等级
          alarmLevel: ''
        }
      ],//记录的事报警、异常解除的大表数据

      //修改日期
      pfmea:[
        {
          id:0,
          process_step: "",         // 过程步骤
          function_description: "", // 功能
          requirement: "",          // 要求
          potential_failure_mode: "", // 潜在失效模式
          potential_failure_effect: "", // 潜在失效后果
          severity_degree: "",      // 严重度
          level: "",                // 级别（非保留字）
          potential_failure_cause_mechanism: "", // 潜在失效起因/机理
          current_process: "",      // 现行过程
          control_prevention: "",   // 控制预防
          frequency: "",            // 频度
          control_detection: "",    // 控制探测
          detection_degree: "",     // 探测度
          rpn: "",                 // RPN（非保留字）
          suggested_measures: "",   // 建议措施
          responsibility_target_completion_date: "", // 责任及目标完成日期
          implementation_result: "", // 实施结果
          measures_completion_date: "", // 采取的措施完成日期
          updated_severity_degree: "", // 更新后的严重度
          updated_frequency: "",      // 更新后的频度
          updated_detection_degree: "", // 更新后的探测度
          updated_rpn: ""            // 更新后的RPN
        }],

      //弹窗控制用的变量
      //弹窗的表头提示
      titleUse:'提示',
      //表头编辑弹窗的控制变量
      dialogTableHeader:false,
      //编辑表头，控制的是编辑报警解除作业指导书的变量
      alarmCanceledDialog:false,
      //控制两个文本框的弹窗变量
      dialogVisibleText:false,
      //上传照片的弹窗
      dialogPicture:false,
      //上传图片的弹窗提示
      dialogPictureAnnex:false,
      //确认添加新的报警报警解除作业指导书的弹窗
      dialogExceptionAdd:false,
      //控制删除按钮的弹窗
      deleteDialog:false,
      //控制用户点击了哪一种弹窗类型
      deleteDataDoe:'',
      //上传视频的弹窗提示
      dialogVideo:false,
      //文本框弹窗中，绑定的两个输入框的内容
      inputText1:'',
      inputTextEnglish1:'',
      inputTextRussian1:'',
      inputText2:'',
      inputNum:0,

      //用户选择的记录
      //用户选择的是那个类型的作业指导书
      typeTableUse:0,
      //用户选择了那个表头操作：1.增加，2.编辑，3.删除；
      editTableUse:0,
      //用户现在了那种作业指导书的编制类型 1.编辑，2.增加，3.删除
      editBookType:0,
      //用户现了是图片的编辑还是视频编辑
      editVideoAndImageUse:0,
      //用户当前点击了大表中的那一个，是一个scope格式。含着对表中的索引值。
      //用户点击了那个主表
      tableDataScope:null,
      //用户点击了那个作业指导书的表
      workBookScope:null,
      //记录用户点击的哪一行的内容，用作改变背景颜色
      workBookRow:null,
      //表头用到的临时变量
      tableDataTemp:{
        //id主键
        id:'',
        //车间名称
        workshop:'',
        //线体名称
        lineName:'',
        //工序名称
        op:'',
        //文件名称
        fileName:'',
        // 版本号
        editionNum:'',
        //编制日期
        writeDate:'',
        //执行日期
        executeDate:'',
        //文件编号
        fileNum:'',
        //编制
        writeUse:'',
        //审核
        examineUse:'',
        //批准
        ratifyUse:'',
        //会签
        countersignUse:'',
        //作业指导书
        workBook:'',
        //图片附件
        BookImage:'',
        // 视频附件
        BookVideo:'',
        // 修改记录
        editRecord:'',
        //指导书类型
        bookType:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        UpdateTime:'',
      },

      //输入表单的控件
      formTableData:{
        //id主键
        id:'',
        //车间名称
        workshop:'',
        //线体名称
        lineName:'',
        //工序名称
        op:'',
        //文件名称
        fileName:'',
        // 版本号
        editionNum:'',
        //编制日期
        writeDate:'',
        //执行日期
        executeDate:'',
        //文件编号
        fileNum:'',
        //编制
        writeUse:'',
        //审核
        examineUse:'',
        //批准
        ratifyUse:'',
        //会签
        countersignUse:'',
        //作业指导书
        workBook:'',
        //图片附件
        BookImage:'',
        // 视频附件
        BookVideo:'',
        // 修改记录
        editRecord:'',
        //指导书类型
        bookType:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        UpdateTime:'',
      },

      //表单校验变量
      rulesForm:{
        workshop:[{ validator: dataNull, trigger: 'blur'},],
        lineName:[{ validator: dataNull, trigger: 'blur'},],
        op:[{ validator: dataNull, trigger: 'blur'},],
        fileName:[{ validator: dataNull, trigger: 'blur'},],
        editionNum:[{ validator: dataNull, trigger: 'blur'},],
        writeDate:[{ validator: dataNull, trigger: 'blur'},],
        executeDate:[{ validator: dataNull, trigger: 'blur'},],
        examineUse:[{ validator: dataNull, trigger: 'blur'},],
        ratifyUse:[{ validator: dataNull, trigger: 'blur'},],
        countersignUse:[{ validator: dataNull, trigger: 'blur'},]
      },

      //固定选择器用到的变量
      //车间名称
      optionWorkshop: optionWorkshop,
      //线体名称
      optionLine:workshopAssembly,
      //工序名称
      optionOp:OpAssembly,
      //版本号
      optionEditionNum:[{
        value:1,
        label:'最新'
      },],
      //线体名称选择器的控制是否可以用
      disabledLineName:true,
      //工序的选择器，控制是否可用
      disabledOp:false,

      //图片相关的数据，录像相关的项目
      itemView:[],//展示图片的路径，用在了走马灯部位
      itemViewVideo:[],//展示视频，用在了走马灯部位
      editPictureType:0,//修改图片的类型，主要记录了
      PictureList:[],//图片文件的
      videoList:[],//录像的文件列表
      disabled:false,//图片显示的控制变量
      dialogImageUrl:'',//弹窗显示的图片路径
      videoUrl:filepath+'',//视频的地址
      fileType:'',//限定上传文件的类型

      workBookHeardUse:1,//用户要看作业指导书的那一部分

      //操作人员的变量
      //记录合格的操作者的信息,大表信息
      operatorList:[
        {
          //主键
          id:'',
          //工号
          operator_id:'',
          //姓名
          operator_name:'',
          //开始时间
          star_time:'',
          //技能等级
          skill_level:'1/4',
          //指导人
          mentor:'',
          //员工图片路径
          operator_path:'',
          //预留
          reserved1:'',
          reserved2:'',
          reserved3:'',
          reserved4:'',
          reserved5:'',
        }
      ],
      //记录合格操作者信息，表单
      operatorListForm:{
        //主键
        id:'',
        //工号
        operator_id:'',
        //姓名
        operator_name:'',
        //开始时间
        star_time:'',
        //技能等级
        skill_level:'1/4',
        //指导人
        mentor:'',
        //员工图片路径
        operator_path:'',
        //预留
        reserved1:'',
        reserved2:'',
        reserved3:'',
        reserved4:'',
        reserved5:'',
      },
      //操作人员的选择器
      //员工等级的选择器
      skill_level_options:[
        {label:'1/4',value: '1/4'},
        {label:'2/4',value: '2/4'},
        {label:'3/4',value: '3/4'},
        {label:'4/4',value: '4/4'},
      ],

      //记录用户要实行哪类操作
      operatorListDoe:0,
      //记录用户点击的是哪一行
      operatorListScope:null,
      //上传人员的图像
      operatorListImageUrl:null,
      //存储上传的人员图片文件，包括文件名称、本体中。
      operatorListFile:null,
      //控制编辑员工信息的弹窗
      operatorDialog:false,
      //控制作业步骤的tabs,判断分页变量
      work_step_tab:'chinese',
      //控制作业步骤的忙加载变量
      work_step_loading:false,

      //富文本的变量
      //注意点说明：
      pointsChineseEditor: null,
      pointsEnglishEditor: null,
      pointsRussianEditor: null,

      //分页控制变量
      table_fileName_tab:'chinese',
      //控制关注点
      pointsActiveTab:'chinese',
      //控制忙加载的变量:用在了控制注意点的编辑
      work_problem_loading:false,

      measurementTechnique:'',
      cycle:''
    }
  },
  watch: {},
  methods: {
    //通用：初始化单个富文本
    initEditor(editorKey, refName, htmlVal) {
      // 销毁已有实例
      if (this[editorKey]) {
        this[editorKey].destroy();
        this[editorKey] = null;
      }

      const container = this.$refs[refName];
      if (!container) return;

      // 创建新实例
      this[editorKey] = new E(container);

      // 配置菜单
      this[editorKey].config.menus = [
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
        'foreColor',
        'backColor',
        'list',
        'justify',
        'table'
      ];

      this[editorKey].create();
      this[editorKey].txt.html(htmlVal)
    },
    //查询用户信息的函数
    inquiry(){
      //输入用户编号，向后端查询信息
      const useId=localStorage.getItem('userName').replace(/"/g, '');
      this.$request.post('/useQueryPower',{
        queryFiledName:'changeModel',
        userId:useId,
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }else {
          this.useName=result.data.name
          this.usePower=result.data.changeModel
          this.useId=useId
        }
      })
    },
    //通用，翻译程序
    translate(doe){
      //作业指导书的步骤部分
      if (doe===1){
        if (this.work_step_tab==='chinese'){
          this.work_step_loading=true
          translate_zh_en_ru(this.inputText1,'zh',1).then(data=>{
            this.inputTextEnglish1=data.en
            this.inputTextRussian1=data.ru
            this.work_step_loading=false
          })
        }
        else if (this.work_step_tab==='english') {
          //判断用户在那个tab上，确定是那个语言
          // 创建包含两个翻译请求的Promise数组
          // 中文翻译
          this.work_step_loading = true
          translate_zh_en_ru(this.inputTextEnglish1, 'en', 1).then(data => {
            this.inputText1=data.zh
            this.inputTextRussian1=data.ru
            this.work_step_loading = false
          })
        }
        else if (this.work_step_tab==='russian'){
          this.work_step_loading=true
          //判断用户在那个tab上，确定是那个语言
          translate_zh_en_ru(this.inputTextRussian1, 'ru', 1).then(data => {
            this.inputText1=data.zh
            this.inputTextEnglish1=data.en
            this.work_step_loading = false
          })
        }
      }
      else if(doe===2){
        if (this.pointsActiveTab==='chinese'){
          this.work_problem_loading=true
          translate_zh_en_ru(this.pointsChineseEditor.txt.html(),'zh',2).then(data=>{
            this.pointsEnglishEditor.txt.html(data.en)
            this.pointsRussianEditor.txt.html(data.ru)
            this.work_problem_loading=false
          })
        }
        else if (this.pointsActiveTab==='english') {
          //判断用户在那个tab上，确定是那个语言
          // 创建包含两个翻译请求的Promise数组
          // 中文翻译
          this.work_problem_loading = true
          translate_zh_en_ru(this.pointsEnglishEditor.txt.html(), 'en', 2).then(data => {
            this.pointsRussianEditor.txt.html(data.ru)
            this.pointsChineseEditor.txt.html(data.zh)
            this.work_problem_loading = false
          })
        }
        else if (this.pointsActiveTab==='russian'){
          this.work_problem_loading=true
          //判断用户在那个tab上，确定是那个语言
          translate_zh_en_ru(this.pointsRussianEditor.txt.html(), 'ru', 2).then(data => {
            this.pointsEnglishEditor.txt.html(data.en)
            this.pointsChineseEditor.txt.html(data.zh)
            this.work_problem_loading = false
          })
        }
      }
    },
    //通用：误关闭弹窗的确认函数(中英俄)
    getI18nText(key) {
      const i18nMessages = {
        chinese: {
          confirmClose: '确认关闭？',
          confirmButton: '确定',
          cancelButton: '取消',
        },
        english: {
          confirmClose: 'Sure to close?',
          confirmButton: 'OK',
          cancelButton: 'Cancel',
        },
        russian: {
          confirmClose: 'Уверен в закрытии?',
          confirmButton: 'Подтвердить',
          cancelButton: 'Отмена',
        },
      };
      return i18nMessages[this.languageS]?.[key] ?? i18nMessages.chinese[key];
    },
    //通用：误关闭弹窗的变量
    handleClose(done) {
      this.$confirm(
          this.getI18nText('confirmClose'), // 消息内容
          {
            confirmButtonText: this.getI18nText('confirmButton'), // 确认按钮
            cancelButtonText: this.getI18nText('cancelButton'),    // 取消按钮
          }
      )
          .then(() => done())
          .catch(() => {});
    },
    //退出登录
    logOut(){
      localStorage.removeItem('u_token');
      localStorage.removeItem('userName')
      this.$router.push('UserLogin')
    },
    //获取当前时间字符串格式
    getCurrentDateFormatted() {
      const now = new Date();

      const year = now.getFullYear();
      const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始，所以要 +1
      const day = String(now.getDate()).padStart(2, '0');

      return `${year}-${month}-${day}`;
    },
    //通用：语言选择
    chooseLanguage(language){
      this.languageS=language
      //语言切换
      if (language==='chinese'){
        //main
        this.main.qualityManagementSystem='俄动力质量管理系统'
        this.main.workInstructions='低频作业指导书'

        this.main.toolReplacement='换刀作业指导书'
        this.main.changeover='换型作业指导书'
        this.main.equipmentOperating='设备操作说明书'
        this.main.fixtureCheck='工装点检指导书'
        this.main.fixtureCalibration='工装校准指导书'
        this.main.operationCheck='标准作业检查指导书'
        this.main.measuringToolsCheck='量检具点检指导书'
        this.main.alarmReleaseCheck='报警解除指导书'
        this.main.inspectionJudgment='报警件判定指导书'
        this.main.pokaYoke='防错有效性验证指导书'
        this.main.sampleTesting='样件测试指导书'
        this.main.equipmentInspection='设备点检指导书'
        this.main.equipmentMaintenance='设备保养指导书'

        this.main.selectionPrompt='选择提示：'
        this.main.underThisProjectThereAre='该项目下有'
        this.main.records='条记录'

        this.main.information='表单信息'
        this.main.line='线体名称：'
        this.main.op='工序号：'
        this.main.verNoLatest='版本号：最新'
        this.main.dateOfPreparation='编制日期：'
        this.main.implementationDate='执行日期：'
        this.main.documentNo='文件编号：'
        this.main.preparedBy='编制：'
        this.main.checked='审核：'
        this.main.countersigned='会签：'
        this.main.approve='批准：'

        this.main.instruction='要领书/指导书'
        this.main.manHour='工时'
        this.main.operator='操作人员'

        this.main.serialNo='序号'
        this.main.content='步骤内容'

        this.main.confirm='确认'
        this.main.cancel='取消'

        this.main.picture='图片'
        this.main.video='视频'

        //pageVal
        this.pageVal.refresh='刷新'
        this.pageVal.search='搜索'
        this.pageVal.reset='重置'
        this.pageVal.searchFile='搜索文件名：'
        this.pageVal.inputFileName='请输入文件名称'
        this.pageVal.workshop='车间名称：'
        this.pageVal.lineName='线体名称：'
        this.pageVal.op='工序号：'
        this.pageVal.editionNum='版本号：'
        this.pageVal.fileName='文件名称：'
        this.pageVal.writeDate='编制日期：'
        this.pageVal.executeDate='执行日期：'
        this.pageVal.designateRelevantPersonnel='指定相关人员'
        this.pageVal.writeUse='编制人'
        this.pageVal.examineUse='审核人'
        this.pageVal.countersignUse='会签人'
        this.pageVal.ratifyUse='批准人'
        this.pageVal.submitResult='提交结果'
        this.pageVal.create='立即创建'
        this.pageVal.cancel='取消'
        this.pageVal.select='请选择'
        this.pageVal.dateSelect='选择日期'
        this.pageVal.enter='请输入内容'
        this.pageVal.seperate='请输入内容,语言使用“|*|”符号分割'
        this.pageVal.prompt1='步骤'
        this.pageVal.prompt2='注意点'
        this.pageVal.workTime='工步用时(单位s)'
        this.pageVal.attentionPointsExplanation='注意点说明：'
        this.pageVal.measurement_technique='评价/测量技术：'
        this.pageVal.cycle='周期：'
        this.pageVal.employeeId='工号'
        this.pageVal.name='姓名'
        this.pageVal.startDate='开始日期'
      }
      else if (language==='english') {
        //main
        this.main.qualityManagementSystem='Quality Management System'
        this.main.workInstructions='Work Instructions'

        this.main.toolReplacement='Tool Replacement'
        this.main.changeover='Changeover'
        this.main.equipmentOperating='Equipment Operating'
        this.main.fixtureCheck='Fixture Check'
        this.main.fixtureCalibration='Fixture Calibration'
        this.main.operationCheck='Standard work check'
        this.main.measuringToolsCheck='Measuring Tools Check'
        this.main.alarmReleaseCheck='Alarm Reset'
        this.main.inspectionJudgment='Defective Part Judgment'
        this.main.pokaYoke='Error-Proofing Validation'
        this.main.sampleTesting='Sample Testing'
        this.main.equipmentInspection='Equipment Inspection'
        this.main.equipmentMaintenance='Equipment Maintenance'

        this.main.selectionPrompt='Selection Prompt:'
        this.main.underThisProjectThereAre='Under this project, there are '
        this.main.records=' records'

        this.main.information='Information'
        this.main.line='Line'
        this.main.op='OP:'
        this.main.verNoLatest='Ver.No:latest'
        this.main.dateOfPreparation='Date of preparation:'
        this.main.implementationDate='Implementation date:'
        this.main.documentNo='Document No.:'
        this.main.preparedBy='Prepared by:'
        this.main.checked='Checked:'
        this.main.countersigned='Countersigned:'
        this.main.approve='Approve:'

        this.main.instruction='Instruction'
        this.main.manHour='Man-hour'
        this.main.operator='Operator'

        this.main.serialNo='NO.'
        this.main.content='Content'

        this.main.confirm='OK'
        this.main.cancel='Cancel'

        this.main.picture='Picture'
        this.main.video='Video'

        //pageVal
        this.pageVal.refresh='Refresh'
        this.pageVal.search='Search'
        this.pageVal.reset='Reset'
        this.pageVal.searchFile='Search file name:'
        this.pageVal.inputFileName='Input file name:'
        this.pageVal.workshop='Workshop:'
        this.pageVal.lineName='Line:'
        this.pageVal.op='OP:'
        this.pageVal.editionNum='Ver.No:'
        this.pageVal.fileName='File Name:'
        this.pageVal.writeDate='Date of preparation:'
        this.pageVal.executeDate='Implementation date:'
        this.pageVal.designateRelevantPersonnel='Designate Relevant Personnel'
        this.pageVal.writeUse='Prepared by'
        this.pageVal.examineUse='Checked'
        this.pageVal.countersignUse='Countersigned'
        this.pageVal.ratifyUse='Approve'
        this.pageVal.submitResult='Submit Result'
        this.pageVal.create='Create Now'
        this.pageVal.cancel='Cancel'
        this.pageVal.select='Select'
        this.pageVal.dateSelect='Select the Date'
        this.pageVal.enter='Enter'
        this.pageVal.seperate='Please enter the content and use the symbol \'| * |\' to separate the language'
        this.pageVal.prompt1='Step'
        this.pageVal.prompt2='Attention Point'
        this.pageVal.workTime='Work Time(s)'
        this.pageVal.attentionPointsExplanation='Attention Points Explanation:'
        this.pageVal.measurement_technique='Measurement Technique:'
        this.pageVal.cycle='Cycle:'
        this.pageVal.employeeId='Employee ID'
        this.pageVal.name='Name'
        this.pageVal.startDate='Start date'
      }
      else if (language==='russian') {
        //main
        this.main.qualityManagementSystem='Система управления качеством'
        this.main.workInstructions='Рабочие инструкции'

        this.main.toolReplacement='Замена инструмента'
        this.main.changeover='Переналадка'
        this.main.equipmentOperating='Эксплуатация оборудования'
        this.main.fixtureCheck='Проверка установки'
        this.main.fixtureCalibration='Калибровка крепления'
        this.main.operationCheck='Стандартная проверка работы'
        this.main.measuringToolsCheck='Проверка измерительных инструментов'
        this.main.alarmReleaseCheck='Сброс аварийного сигнала'
        this.main.inspectionJudgment='Определение аварийных деталей'
        this.main.pokaYoke='Проверка эффективности защиты от ошибок'
        this.main.sampleTesting='Испытание образцов'
        this.main.equipmentInspection='Технический осмотр оборудования'
        this.main.equipmentMaintenance='Техническое обслуживание оборудования'

        this.main.selectionPrompt='Выборная строка:'
        this.main.underThisProjectThereAre='В рамках этого проекта есть '
        this.main.records=' записи'

        this.main.information='Информация'
        this.main.line='Линия'
        this.main.op='Операция:'
        this.main.verNoLatest='Номер версии: последний'
        this.main.dateOfPreparation='Дата разработки:'
        this.main.implementationDate='Дата внедрения:'
        this.main.documentNo='Номер документа:'
        this.main.preparedBy='Кем разработан:'
        this.main.checked='Проверено:'
        this.main.countersigned='Подписано:'
        this.main.approve='Одобрено:'

        this.main.instruction='Инструкция'
        this.main.manHour='Рабочее время'
        this.main.operator='Оператор'

        this.main.serialNo='Hомер'
        this.main.content='Содержание'

        this.main.confirm='Подтвердить'
        this.main.cancel='Oтменить'

        this.main.picture='Изображение'
        this.main.video='Видео'

        //pageVal
        this.pageVal.refresh='Обновить'
        this.pageVal.search='Поиск'
        this.pageVal.reset='Сбросить'
        this.pageVal.searchFile='Поиск имени файла:'
        this.pageVal.inputFileName='Имя файла ввода'
        this.pageVal.workshop='Цех:'
        this.pageVal.lineName='Линия:'
        this.pageVal.op='Операция:'
        this.pageVal.editionNum='Номер версии:'
        this.pageVal.fileName='Имя файла:'
        this.pageVal.writeDate='Дата разработки:'
        this.pageVal.executeDate='Дата внедрения:'
        this.pageVal.designateRelevantPersonnel='Designate Relevant Personnel'
        this.pageVal.writeUse='Кем разработан'
        this.pageVal.examineUse='Проверено'
        this.pageVal.countersignUse='Подписано'
        this.pageVal.ratifyUse='Одобрено'
        this.pageVal.submitResult='Отправить результат'
        this.pageVal.create='Cоздать сейчас'
        this.pageVal.cancel='Oтменить'
        this.pageVal.select='Выбрать'
        this.pageVal.dateSelect='Выберите дату'
        this.pageVal.enter='Введите'
        this.pageVal.seperate='Пожалуйста, введите содержание и используйте символ \'| * |\' для разделения языка'
        this.pageVal.prompt1='Шаг'
        this.pageVal.prompt2='Точка внимания'
        this.pageVal.workTime='Время работы(Секунда)'
        this.pageVal.attentionPointsExplanation='Объяснение пунктов внимания:'
        this.pageVal.measurement_technique='Техника измерения:'
        this.pageVal.cycle='Цикл:'
        this.pageVal.employeeId='ID сотрудника'
        this.pageVal.name='Имя'
        this.pageVal.startDate='Дата начала'
      }
    },
    //通用的删除键弹窗；现在用到了1、删除控制计划的关联；2、删除人员按钮；
    deleteData(doe, scope) {
      this.deleteDataDoe = doe
      if (doe==='operatorRowDeleteData'){
        this.titleUse='删除该条人员信息'
        this.operatorListScope=scope
        this.operatorListForm=_.cloneDeep(scope.row)
        this.deleteDialog = true
      }
    },
    //通用，点击删除弹框中的确定按钮
    //通用的删除键弹窗点击OK；1.删除控制计划关联,2:删除操作人员；
    deleteDataOk() {
       if (this.deleteDataDoe==='operatorRowDeleteData'){
        //组合数据
        let operatorListTemp=_.cloneDeep(this.operatorList)
        //删除一行数据
        operatorListTemp.splice(this.operatorListScope.$index,1)
        let str=''
        for (let i = 0; i < operatorListTemp.length; i++) {
          operatorListTemp[i].id=i+1
          //组合数据
          let temp= Object.values(operatorListTemp[i]).join('|%|')
          if (i===0){
            str=temp
          }
          else {
            str=str+'|-|'+temp
          }
        }
        //向后端发送，需要用传输文件的接口
        const formData = new FormData();
        formData.append('file', '')
        formData.append('fieldName','operator')
        formData.append('fieldVal',str)
        formData.append('fileName','')
        formData.append('id',this.tableDataScope.row.id)
        //状态码，0：代表新增；1:代表删除老的，加入新的；即新的替换老的；2：删除老的；
        formData.append('type',2)
        //老文件的文件名称
        formData.append('oldFileName',this.operatorListForm.operator_path)
        this.$requestFile.post('/editOperatorChangeModelNew',formData).then(result=>{
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          else {
            //修改大表数据
            this.tableData[this.tableDataScope.$index].operator=str
            //修改scope数据
            this.tableDataScope.row.operator= str
            //修改operatorList数据
            this.operatorList.splice(this.operatorListScope.$index,1)
            //修改图片列表
            this.itemView=[]
            this.itemView.push(filepath+this.operatorListForm.operator_path)
            this.$message.success('删除成功')
            this.deleteDialog=false
          }
        })
      }
    },

    //—————————————————————————————————————————————————————————————————————————
    //用户现在选的是哪一种作业指导书
    typeTable(doe){
      //数据初识化
      this.tableData=[]
      this.workBook=[]
      this.PictureList=[]
      this.itemView=[]
      this.tableDataTemp={
        //id主键
        id:'',
        //车间名称
        workshop:'',
        //线体名称
        lineName:'',
        //工序名称
        op:'',
        //文件名称
        fileName:'',
        // 版本号
        editionNum:'',
        //编制日期
        writeDate:'',
        //执行日期
        executeDate:'',
        //文件编号
        fileNum:'',
        //编制
        writeUse:'',
        //审核
        examineUse:'',
        //批准
        ratifyUse:'',
        //会签
        countersignUse:'',
        //作业指导书
        workBook:'',
        //图片附件
        BookImage:'',
        // 视频附件
        BookVideo:'',
        // 修改记录
        editRecord:'',
        //指导书类型
        bookType:'',
        //删除标记位
        deleteSign:'',
        //创建时间
        establishTime:'',
        //修改时间
        UpdateTime:'',
      }

      this.typeTableUse=doe
      //是换刀作业指导书
      if (this.typeTableUse===1){
        //设置按钮颜色
        this.background1 = {backgroundColor: '#0269fa',color:'white'}
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('换刀作业').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='换刀作业要领书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Tool Replacement'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Замена инструмента'
        }
        this.drawer=true
      }
      //是换型指导书
      else if (this.typeTableUse===2){
        this.background1 = ''
        this.background2 = {backgroundColor: '#0269fa',color:'white'}
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('换型作业').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='换型作业要领书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Changeover'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Переналадка'
        }
        this.drawer=true

      }
      //是设备操作说明书
      else if (this.typeTableUse===3){
        this.background1 = ''
        this.background2 = ''
        this.background3 = {backgroundColor: '#0269fa',color:'white'}
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        // 先清空数据，避免重复添加
        this.tableData = []
        this.filterTableData = []
        this.filterFileName = ''
        //查询数据
        this.inquiryType('设备操作说明书').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='设备操作说明书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Equipment Operating '
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Эксплуатация оборудования'
        }
        this.drawer=true

      }
      //是工装点检指导书
      else if (this.typeTableUse===4){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = {backgroundColor: '#0269fa',color:'white'}
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('工装点检').then(data=>{
          this.tableData=data
          this.filterTableData=data
        })
        this.queryDrawingNumberList()
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='工装点检指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Fixture Check'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Проверка установки'
        }
        this.drawer=true

      }
      //是工装校准指导书
      else if (this.typeTableUse===10){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = {backgroundColor: '#0269fa',color:'white'}
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('工装校准').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='工装校准指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Fixture Calibration'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Калибровка крепления'
        }
        this.drawer=true

      }
      //是标准作业检查指导书
      else if (this.typeTableUse===5){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = {backgroundColor: '#0269fa',color:'white'}
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('标准作业检查').then(data=>{
          this.tableData=data
          this.tableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='标准作业检查指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Operation Check '
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Оперативный контроль'
        }
        this.drawer=true
      }
      //是量检具点检指导书
      else if (this.typeTableUse===6){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = {backgroundColor: '#0269fa',color:'white'}
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('量检具点检').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='量检具点检指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Measuring Tools Check'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Проверка измерительных инструментов'
        }
        this.drawer=true
      }
      //是报警解除要领书
      else if (this.typeTableUse===7){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = {backgroundColor: '#0269fa',color:'white'}
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''
        //查询数据
        this.inquiryType('报警解除').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
          //确认有无这一项报警信息，对应记录的是报警的唯一id号，记录到了bookImage的字段中
          //1.调取报警信息中不是备用的数据，先调用全部的报警基本数据
          let dataFilter=[]
          this.queryPlcAlarmSetting().then(data=>{
            dataFilter=data.filter(item=>item.alarmInformationChinese!=='备用')
            //查找那个报警没有做作业指导书
            let noBook=[]
            for (let i = 0; i < dataFilter.length; i++) {
              let isHave=0
              for (let j = 0; j <this.tableData.length; j++) {
                if (this.tableData[j].bookImage.toString()===dataFilter[i].id.toString()){
                  isHave=1
                  break
                }
              }
              if (isHave===0){
                noBook.push(dataFilter[i])
              }
            }
            //组合需要添加的《报警解除作业指导书》数据
            this.plcAlarmSettingData=noBook
            //弹窗显示，是否要增加这些报警信息
            if (this.plcAlarmSettingData.length>1){
              this.dialogExceptionAdd=true
            }
          })
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='报警解除指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Alarm Reset'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Сброс аварийного сигнала'
        }
        this.drawer=true
      }
      //是报警件判定指导书
      else if (this.typeTableUse===8){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = {backgroundColor: '#0269fa',color:'white'}
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''

        //查询数据
        this.inquiryType('报警件判定').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='报警件判定指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Defective Part Judgment'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Анализ забракованной детали'
        }
        this.drawer=true
      }
      //是防错有效性验证指导书
      else if (this.typeTableUse===9){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = {backgroundColor: '#0269fa',color:'white'}
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = ''

        //查询数据
        this.inquiryType('防错有效性验证').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='防错有效性验证指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Error-Proofing Validation'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Проверка эффективности защиты от ошибок'
        }
        this.drawer=true
      }
      //是样件测试指导书
      else if (this.typeTableUse===11){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = {backgroundColor: '#0269fa',color:'white'}
        this.background12 = ''
        this.background13 = ''

        //查询数据
        this.inquiryType('样件测试').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='样件测试指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Sample Testing'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Испытание образцов'
        }
        this.drawer=true
      }
      //是设备点检指导书
      else if (this.typeTableUse===12){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = {backgroundColor: '#0269fa',color:'white'}
        this.background13 = ''

        //查询数据
        this.inquiryType('设备点检').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='设备点检指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Equipment Inspection'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Технический осмотр оборудования'
        }
        this.drawer=true
      }
      //是设备保养指导书
      else if (this.typeTableUse===13){
        this.background1 = ''
        this.background2 = ''
        this.background3 = ''
        this.background4 = ''
        this.background5 = ''
        this.background6 = ''
        this.background7 = ''
        this.background8 = ''
        this.background9 = ''
        this.background10 = ''
        this.background11 = ''
        this.background12 = ''
        this.background13 = {backgroundColor: '#0269fa',color:'white'}

        //查询数据
        this.inquiryType('设备保养').then(data=>{
          this.tableData=data
          this.filterTableData=_.cloneDeep(data)
        })
        //打开抽屉
        if (this.languageS==='chinese'){
          this.drawerTitle='设备保养指导书'
        }
        else if (this.languageS==='english'){
          this.drawerTitle='Equipment Maintenance'
        }
        else if (this.languageS==='russian'){
          this.drawerTitle='Техническое обслуживание оборудования'
        }
        this.drawer=true
      }
    },
    //辅助函数，依据用户现在的是哪一种作业指导书，筛选出所有的数据来,改造成带有返回值的函数
    async inquiryType(type){
      //向后端发送请求，把查询出来的作业指导书类别赋值给大表。
      const result= await this.$request.post('/inquiryType',type)
      if (result.code === 401) {
        this.$router.push('UserLogin')
        alert("您未登录，请登录")
      } else {
        return result.data
      }
    },

    // 搜索方法
    handleSearch() {
      if (!this.filterFileName.trim()) {
        // 如果搜索框为空，显示所有数据
        this.filterTableData = [...this.tableData];
        return;
      }

      const query = this.filterFileName.toLowerCase();
      this.filterTableData = this.tableData.filter(item => {
        // 处理多语言文件名
        let fileName = '';
        if (this.languageS === 'chinese' && item.fileName.split('|*|').length === 3) {
          fileName = item.fileName.split('|*|')[0];
        } else if (this.languageS === 'english' && item.fileName.split('|*|').length === 3) {
          fileName = item.fileName.split('|*|')[1];
        } else if (this.languageS === 'russian' && item.fileName.split('|*|').length === 3) {
          fileName = item.fileName.split('|*|')[2];
        } else {
          fileName = item.fileName;
        }

        // 模糊匹配
        return fileName.toLowerCase().includes(query);
      });
    },
    // 重置搜索
    resetSearch() {
      this.filterFileName = '';
      this.filterTableData = [...this.tableData];
    },

    //主表排序用的函数
    formatter(row, column) {
      console.log(column)
      return row.address;
    },

    //切换照片和视频的函数
    switchVideo(doe){
      //doe=1,显示图片，doe=2，显示视频
      this.switchVideoUse=doe

      if (doe===1){
        this.videoAndImage1='#0269fa'
        this.videoAndImageColor1='white'

        this.videoAndImage2='white'
        this.videoAndImageColor2=''

        this.videoAndImage3='white'
        this.videoAndImageColor3=''
      }
      else if (doe===2){
        this.videoAndImage1='white'
        this.videoAndImageColor1=''

        this.videoAndImage2='#0269fa'
        this.videoAndImageColor2='white'

        this.videoAndImage3='white'
        this.videoAndImageColor3=''
      }
      else if (doe===3){
        this.videoAndImage1='white'
        this.videoAndImageColor1=''

        this.videoAndImage2='white'
        this.videoAndImageColor2=''

        this.videoAndImage3='#0269fa'
        this.videoAndImageColor3='white'
      }
    },

    //编辑作业指导书用到的
    editBook(doe,scope){
      this.loading=false
      //把用户选择的是那个操作传递出去
      this.editBookType=doe//1.用户选择的是修改作业指导书
      //把点击的数据传递出去，是scope格式的
      this.workBookScope=scope
      //在换刀作业指导书中的操作
      if (this.typeTableUse===1){
        //是换刀作业指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑换刀作业指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Tool Replacement'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете замену инструмента'
          }

          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputText2=_.cloneDeep(this.workBookScope.row.problem)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条换刀作业指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Tool Replacement'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Замена инструмента'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是换刀作业指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除换刀作业指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
        /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.itemViewVideo = []
          }
          else {
            this.itemViewVideo = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.itemViewVideo.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在换型作业指导书中的操作
      if (this.typeTableUse===2){
        //是换型作业指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑换型作业指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Changeover'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Переналадка'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条换型作业指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Changeover'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Переналадка'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          this.dialogVisibleText=true
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是换型作业指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除换型作业指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.itemViewVideo = []
          }
          else {
            this.itemViewVideo = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.itemViewVideo.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在设备操作说明书中的操作
      if (this.typeTableUse===3){
        //是设备操作说明书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑设备操作说明书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Equipment operating'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Эксплуатация оборудования'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条设备操作说明书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Equipment operating'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Эксплуатация оборудования'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是设备操作说明书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除设备操作说明书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.itemViewVideo = []
          }
          else {
            this.itemViewVideo = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.itemViewVideo.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在工装点检指导书中的操作
      if (this.typeTableUse===4){
        //是工装点检指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑工装点检指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Fixture Check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Проверка установки'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }
          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条工装点检指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Fixture check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Проверка установки'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是工装点检指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除工装点检指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在工装校准指导书中的操作
      if (this.typeTableUse===10){
        //是工装点检指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑工装校准指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Fixture Calibration'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Калибровка крепления'
          }

          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }
          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条工装校准指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Fixture Calibration'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Калибровка крепления'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是工装点检指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除工装校准指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在标准作业检查指导书中的操作
      if (this.typeTableUse===5){
        //是标准作业检查中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑标准作业检查'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Standard work check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Стандартная проверка работы'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条标准作业检查内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Standard work check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Стандартная проверка работы'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是标准作业检查中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除标准作业检查的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在量检具点检指导书中的操作
      if (this.typeTableUse===6){
        //是量检具点检指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑量检具点检指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Measuring Tools Check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Проверка измерительных инструментов'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            if (this.languageS==='chinese'){
              this.titleUse='您正在添加一条量检具点检指导书内容'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are adding a piece of content of Measuring tools check'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы добавляете часть контента Проверка измерительных инструментов'
            }
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of Measuring Tools Check'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Проверка измерительных инструментов'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是量检具点检指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除量检具点检指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在报警解除指导书中的操作
      if (this.typeTableUse===7){
        //是报警解除指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑设备报警解除指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Alarm Reset'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Сброс аварийного сигнала'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条报警解除指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Alarm Reset'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Сброс аварийного сигнала'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警解除指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除报警解除指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在报警件判定指导书中的操作
      if (this.typeTableUse===8){
        //是报警件判定指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑报警件判定指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Defective Part Judgment'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Сброс Определение аварийных деталей'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条报警件判定指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Defective Part Judgment'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Определение аварийных деталей'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警件判定指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除报警件判定指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在防错有效性验证指导书中的操作
      if (this.typeTableUse===9){
        //是量检具点检指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑防错有效性验证指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Error-Proofing Validation'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Проверка эффективности защиты от ошибок'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条防错有效性验证指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Error-Proofing Validation'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Проверка эффективности защиты от ошибок'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警解除指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除防错有效性验证指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在样件测试指导书中的操作
      if (this.typeTableUse===11){
        //是样件测试指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑样件测试指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Sample Testing'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Испытание образцов'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条样件测试指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Sample Testing'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Испытание образцов'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警解除指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除样件测试指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在设备点检指导书中的操作
      if (this.typeTableUse===12){
        //是样件测试指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑设备点检指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Equipment Inspection'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Технический осмотр оборудования'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条设备点检指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Equipment Inspection'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Технический осмотр оборудования'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警解除指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除设备点检指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
      //在设备保养行指导书中的操作
      if (this.typeTableUse===13){
        //是样件测试指导书中的编辑操作
        if (this.editBookType===1){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑设备保养指导书'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the Equipment Maintenance'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете Техническое обслуживание оборудования'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }
          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true
          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
        //是要向下添加一条操作要领
        else if (this.editBookType===2){
          if (this.languageS==='chinese'){
            this.titleUse='您正在添加一条设备保养指导书内容'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are adding a piece of content of Equipment Maintenance'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы добавляете часть контента Техническое обслуживание оборудования'
          }
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''

          this.inputNum=0
          this.dialogVisibleText=true

          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', '')
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', '')
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', '')
          })
        }
        //是报警解除指导书中的删除操作
        else if (this.editBookType===3){
          if (this.languageS==='chinese'){
            this.titleUse='您正在删除设备保养指导书的本条内容，点击“确定”删除'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are deleting this content. Click "OK" to delete it'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы удаляете этот контент. Нажмите "Подтвердить", чтобы удалить его'
          }
          //组合作业指导书步骤
          this.inputText1=''
          this.inputTextEnglish1=''
          this.inputTextRussian1=''
          if (this.workBookScope.row.work!=='' && this.workBookScope.row.work!==null && this.workBookScope.row.work!==undefined){
            if (this.workBookScope.row.work.split('|*|').length===3){
              this.inputText1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[0]
              this.inputTextEnglish1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[1]
              this.inputTextRussian1=_.cloneDeep(this.workBookScope.row.work.split('|*|'))[2]
            }
            else {
              this.inputText1=_.cloneDeep(this.workBookScope.row.work)
              this.inputTextEnglish1=''
              this.inputTextRussian1=''
            }
          }

          this.inputNum=_.cloneDeep(this.workBookScope.row.spendTime)
          this.dialogVisibleText=true

          //将注意点拆分
          let tempProblem=scope.row.problem.split('|*|')
          //初始化富文本编辑器，把拆分后的中英俄赋值给中英俄富文本输入框
          this.$nextTick(() => {
            this.initEditor('pointsChineseEditor', 'pointsChineseEditor', tempProblem[0]);
            this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', tempProblem[1]);
            this.initEditor('pointsRussianEditor', 'pointsRussianEditor', tempProblem[2]);
          })
        }
            //*是插入图片的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===4){
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          //组合图片编辑列表的数据
          //组合照片的数据
          if (this.workBookScope.row.pictureList.includes('undefined')){
            //没有图片信息
            this.PictureList = []
          }
          else {
            this.PictureList = []
            const temp1 = this.workBookScope.row.pictureList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.PictureList.push(temp2)
            }
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的图片信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the image information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете информацию об изображении этой строки'
          }
          this.fileType='image/jpeg, image/png'
          this.dialogPicture=true
        }
            /*是插入视频的操作*/
        //是编辑照片的操作，包括添加、删除。
        else if (this.editBookType===5){
          //组合视频的数据
          if (this.workBookScope.row.videoList.includes('undefined')){
            //没有视频信息
            this.videoList = []
          }
          else {
            this.videoList = []
            const temp1 = this.workBookScope.row.videoList.split('|*|')
            for (let i = 0; i < temp1.length - 1; i++) {
              let temp2 = {
                name: temp1[i],
                percentage: 0,
                raw: File,
                size: 0,
                status: null,
                uid: null,
                url: filepath + temp1[i]
              }
              this.videoList.push(temp2)
            }
          }
          this.fileType='video/mp4, video/x-matroska, video/quicktime, video/webm'
          if (this.languageS==='chinese'){
            this.titleUse='您正在编辑本行的视频信息'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are editing the video information of this line'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы редактируете видеоинформацию этой строки'
          }
          this.dialogVideo=true
        }
      }
    },
    //辅助函数：编辑作业指导书的打包函数，是把作业指导书中所有的信息写入到同一个字段中的操作（编辑、删除、增加、增加图片、增加录像都有）
    saveEditWorkBooKData(){
      //是装配作业指导书下的修改某一个条目的操作|*||*|
      if (this.inputText1==='' || this.inputText1===null || this.inputText1===undefined){
        this.inputText1='作业指导书步骤'
      }
      if (this.inputTextEnglish1==='' || this.inputTextEnglish1===null || this.inputTextEnglish1===undefined){
        this.inputTextEnglish1='Steps of homework instruction manual'
      }
      if (this.inputTextRussian1==='' || this.inputTextRussian1===null || this.inputTextRussian1===undefined){
        this.inputTextRussian1='Этапы руководства по оперативной деятельности'
      }

      //赋值富文本为空的情况,组合的是关注点
      if (this.pointsChineseEditor.txt.html()==='' ||this.pointsChineseEditor.txt.html()===undefined || this.pointsChineseEditor.txt.html===null){
        this.pointsChineseEditor.txt.html('无注意点')
      }
      if (this.pointsEnglishEditor.txt.html()==='' ||this.pointsEnglishEditor.txt.html()===undefined || this.pointsEnglishEditor.txt.html===null){
        this.pointsEnglishEditor.txt.html('No Attention Points')
      }
      if (this.pointsRussianEditor.txt.html()==='' ||this.pointsRussianEditor.txt.html()===undefined || this.pointsRussianEditor.txt.html===null){
        this.pointsRussianEditor.txt.html('Нет точек внимания')
      }

      //赋值评价测量技术为空的情况
      if (this.measurementTechnique==='' || this.measurementTechnique===null || this.measurementTechnique===undefined){
        this.measurementTechnique='不涉及/Not Involved/Не относится'
      }
      //赋值周期为空的情况
      if (this.cycle==='' || this.cycle===null || this.cycle===undefined){
        this.cycle='不涉及/Not Involved/Не относится'
      }

      if (this.editBookType===1){
        // 是编辑作业指导书
        // 判断是否设置了作业时间长度，如果没有，将强制输入
        if (this.inputNum==='' || this.inputNum===0){
          alert("工步时长未设置，请设置后提交")
          return ''; // 返回空字符串或错误信息
        }
        // 判断用户输入的数据是否为空,并组合新数据
        if (this.inputText2===''){
          this.inputText2='请编辑失效模式'
        }
        // 组合成文本数据
        //向总数据中进行组合
        let temp=_.cloneDeep(this.workBook)
        temp[this.workBookScope.$index].work=this.inputText1+'|*|'+this.inputTextEnglish1+'|*|'+this.inputTextRussian1
        temp[this.workBookScope.$index].problem=this.pointsChineseEditor.txt.html()+'|*|'+this.pointsEnglishEditor.txt.html()+'|*|'+this.pointsRussianEditor.txt.html()
        temp[this.workBookScope.$index].spendTime=this.inputNum
        temp[this.workBookScope.$index].measurementTechnique=this.measurementTechnique
        temp[this.workBookScope.$index].cycle=this.cycle
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          let oneTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].measurementTechnique+'|%|'+temp[i].cycle+'|-|'
          strTemp=strTemp+oneTemp
        }
        //向后端发送信息
        //向后端发动数据，进行保存
        this.$request.post('editChangeModelField',{
          id:this.tableDataScope.row.id,
          fieldName:'workBook',
          fieldVal:strTemp,
          fieldValOld:this.tableDataScope.row.workBook,
          editUseName:this.useName
        })
            .then(result=>{
              if (result.code === 401) {
                this.$router.push('UserLogin')
                alert("您未登录，请登录")
              } else {
                this.$message.success('修改成功')
                this.dialogVisibleText=false
                //对新数据进行重新编辑
                //把数据进行分割
                const temp=result.data.split('|-|')
                //数据进行循环，并且进行组合
                //作业指导书的步骤组合
                this.workBook=[]
                for (let i = 0; i < temp.length-1; i++) {
                  const tempData=temp[i].split('|%|')
                  const tempWorkBook={
                    id:i,
                    work:tempData[0],//工作步骤
                    problem:tempData[1],//关注点
                    spendTime:tempData[2],//需要时间
                    pictureList:tempData[3],//图片列表
                    videoList:tempData[4],//视频列表
                    measurementTechnique:tempData[5],//评价测量技术
                    cycle:tempData[6]//周期
                  }
                  this.workBook.push(tempWorkBook)
                }
              }
            })
      }
      else if (this.editBookType===2){
        //是向下插入操作
        //判断是否设置了作业时间长度，如果没有，将强制输入
        if (this.inputNum==='' || this.inputNum===0){
          alert("工步时长未设置，请设置后提交")
          return ''; // 返回空字符串或错误信息
        }
        // 判断用户输入的数据是否为空,并组合新数据
        if (this.inputText2===''){
          this.inputText2='请编辑失效模式'
        }
        let temp=_.cloneDeep(this.workBook)
        temp.splice(this.workBookScope.$index+1,0,
            {
              id:0,
              work:this.inputText1+'|*|'+this.inputTextEnglish1+'|*|'+this.inputTextRussian1,
              problem:this.pointsChineseEditor.txt.html()+'|*|'+this.pointsEnglishEditor.txt.html()+'|*|'+this.pointsRussianEditor.txt.html(),
              spendTime:this.inputNum,//需要时间
              pictureList:'undefined|*|',//图片列表
              videoList:'undefined|*|',//视频列表
              measurementTechnique: this.measurementTechnique,//评价测量技术
              cycle: this.cycle//周期
            })
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          let oneTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].measurementTechnique+'|%|'+temp[i].cycle+'|-|'
          strTemp=strTemp+oneTemp
        }
        //向后端发送信息
        //向后端发动数据，进行保存
        this.$request.post('editChangeModelField',{
          id:this.tableDataScope.row.id,
          fieldName:'workBook',
          fieldVal:strTemp,
          fieldValOld:this.tableDataScope.row.workBook,
          editUseName:this.useName
        })
            .then(result=>{
              if (result.code === 401) {
                this.$router.push('UserLogin')
                alert("您未登录，请登录")
              } else {
                this.dialogVisibleText=false
                this.$message.success('修改成功')
                //对新数据进行重新编辑
                //把数据进行分割
                const temp=result.data.split('|-|')
                //数据进行循环，并且进行组合
                //作业指导书的步骤组合
                this.workBook=[]
                for (let i = 0; i < temp.length-1; i++) {
                  const tempData=temp[i].split('|%|')
                  const tempWorkBook={
                    id:i,
                    work:tempData[0],//工作步骤
                    problem:tempData[1],//关注点
                    spendTime:tempData[2],//需要时间
                    pictureList:tempData[3],//图片列表
                    videoList:tempData[4],//视频列表
                    measurementTechnique:tempData[5],//评价测量技术
                    cycle:tempData[6]//周期
                  }
                  this.workBook.push(tempWorkBook)
                }
              }
            })
      }
      else if (this.editBookType===3){
        //是删除操作
        //如果只有一条数据，不允许删除
        if (this.workBook.length===1){
          alert("只有一条数据，不允许删除")
          this.dialogVisibleText=false
          return
        }
        //向总数据中进行组合
        let temp=_.cloneDeep(this.workBook)
        temp.splice(this.workBookScope.$index,1)
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          let oneTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].measurementTechnique+'|%|'+temp[i].cycle+'|-|'
          strTemp=strTemp+oneTemp
        }
        //向后端发送信息
        //向后端发动数据，进行保存
        this.$request.post('editChangeModelField',{
          id:this.tableDataScope.row.id,
          fieldName:'workBook',
          fieldVal:strTemp,
          fieldValOld:this.tableDataScope.row.workBook,
          editUseName:this.useName
        })
            .then(result=>{
              if (result.code === 401) {
                this.$router.push('UserLogin')
                alert("您未登录，请登录")
              } else {
                this.dialogVisibleText=false
                this.$message.success('删除成功')
                //对新数据进行重新编辑
                //把数据进行分割
                const temp=result.data.split('|-|')
                //数据进行循环，并且进行组合
                //作业指导书的步骤组合
                this.workBook=[]
                for (let i = 0; i < temp.length-1; i++) {
                  const tempData=temp[i].split('|%|')
                  const tempWorkBook={
                    id:i,
                    work:tempData[0],//工作步骤
                    problem:tempData[1],//关注点
                    spendTime:tempData[2],//需要时间
                    pictureList:tempData[3],//图片列表
                    videoList:tempData[4],//视频列表
                    measurementTechnique:tempData[5],//评价测量技术
                    cycle:tempData[6]//周期
                  }
                  this.workBook.push(tempWorkBook)
                }
              }
            })
      }
    },
    //编辑作业指导书，弹出的窗体点击确定
    saveDataTextTwo(){
      //是换刀作业指导书
      if (this.typeTableUse===1){
        this.saveEditWorkBooKData()
      }
      //是换型作业指导书
      else if (this.typeTableUse===2){
        this.saveEditWorkBooKData()
      }
      //是设备操作说明书
      else if (this.typeTableUse===3){
        this.saveEditWorkBooKData()
      }
      //是工装点检作业指导书
      else if (this.typeTableUse===4){
        this.saveEditWorkBooKData()
      }
      //是工装校准作业指导书
      else if (this.typeTableUse===10){
        this.saveEditWorkBooKData()
      }
      //是标准作业检查指导书
      else if (this.typeTableUse===5){
        this.saveEditWorkBooKData()
      }
      //是计量器具指导书
      else if (this.typeTableUse===6){
        this.saveEditWorkBooKData()
      }
      //是报警解除作业指导书
      else if (this.typeTableUse===7){
        this.saveEditWorkBooKData()
      }
      //是报警件判定作业指导书
      else if (this.typeTableUse===8){
        this.saveEditWorkBooKData()
      }
      //是防错有效性验证作业指导书
      else if (this.typeTableUse===9){
        this.saveEditWorkBooKData()
      }
      //是样件测试指导书
      else if (this.typeTableUse===11){
        this.saveEditWorkBooKData()
      }
      //是设备点检指导书
      else if (this.typeTableUse===12){
        this.saveEditWorkBooKData()
      }
      //是设备保养指导书
      else if (this.typeTableUse===13){
        this.saveEditWorkBooKData()
      }
    },

    //表头中编辑用到的辅助函数
    //编辑表头的函数，是编辑整个作业指导书，不是编辑指导书部分。是编辑作业指导书整体的写法。有：1：增加；2：修改；3：删除
    editTable(doe){
      if (this.typeTableUse===0){
        let alertMessage= "请先选择作业指导书类型";
        if (this.languageS === 'chinese') {
          alertMessage = "请先选择作业指导书类型";
        } else if (this.languageS === 'english') {
          alertMessage = "Please select the work instruction type first";
        } else if (this.languageS === 'russian') {
          alertMessage = "Пожалуйста, сначала выберите тип инструкции";
        } else {
          alertMessage = "请先选择作业指导书类型"; // 默认中文
        }
        this.$message.success(alertMessage);
      }
      //做的是换刀作业指导书
      else if (this.typeTableUse===1){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入(新建）操作
        if (doe===1){
          //组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'换刀作业',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《换刀作业指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Tool Replacement"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Замена инструмента"'
          }
          this.dialogTableHeader=true
        }
        //是编辑一个作业指导书
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《换刀作业指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Tool Replacement"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Замена инструмента"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除一个作业指导书
        else if (doe===3){
          if (this.workBook.length===0){
            // alert("请选择一个指导书进行修改")
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《换刀作业指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Tool Replacement"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Замена инструмента"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是换型作业指导书
      else if (this.typeTableUse===2){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作（新增）
        if (doe===1){
          //组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'换型作业',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《换型作业指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Changeover"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Переналадка"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《换型作业指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Changeover"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Переналадка"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《换型作业指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Changeover"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Переналадка"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //是设备操作说明书
      else if (this.typeTableUse===3){
        //做的是设备操作说明书,
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'设备操作说明书',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《设备操作说明书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Equipment operating"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Эксплуатация оборудования"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《设备操作说明书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Equipment operating"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Эксплуатация оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《设备操作说明书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Equipment operating"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Эксплуатация оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是工装点检指导书
      else if (this.typeTableUse===4){
        //编辑的是工装点检作业指导书
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'工装点检',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《工装点检指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Fixture check"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Проверка инструментов"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《工装点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Fixture check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Проверка инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《工装点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Fixture check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Проверка инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是工装校准指导书
      else if (this.typeTableUse===10){
        //编辑的是工装点检作业指导书
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'工装校准',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《工装校准指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Fixture calibration"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Калибровка крепления"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《工装校准指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Fixture calibration"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Калибровка крепления"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《工装校准指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Fixture calibration"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Калибровка крепления"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是标准作业检查作业指导书
      else if (this.typeTableUse===5){
        //编辑的是标准作业检查指导书
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'标准作业检查',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《标准作业检查指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Standard work check"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Стандартная проверка работы"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage = "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《标准作业检查指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Standard work check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Стандартная проверка работы"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《标准作业检查指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Standard work check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Стандартная проверка работы"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是量检具点检指导书
      else if (this.typeTableUse===6){
        //编辑的是标准作业检查指导书
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'量检具点检',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《量检具点检指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Measuring tools check"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Проверка измерительных инструментов"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《量检具点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Measuring tools check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Проверка измерительных инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《量检具点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Measuring tools check"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Проверка измерительных инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是报警解除指导书
      else if (this.typeTableUse===7){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'报警解除',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《报警解除指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Alarm Reset"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Проверка измерительных инструментов"'
          }
          this.alarmCanceledDialog=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《报警解除指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Alarm Reset"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Проверка измерительных инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《报警解除指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Alarm Reset"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Проверка измерительных инструментов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是报警件判定指导书
      else if (this.typeTableUse===8){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'报警件判定',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《报警件判定指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Defective part judgement"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Определение аварийных деталей"'
          }
          this.alarmCanceledDialog=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《报警件判定指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Defective part judgement"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Определение аварийных деталей"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《报警件判定指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Defective part judgement"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Определение аварийных деталей"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是防错有效性验证指导书
      else if (this.typeTableUse===9){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'防错有效性验证',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《防错有效性验证指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Error-Proofing Validation"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Проверка эффективности защиты от ошибок"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.success(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《防错有效性验证指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Error-Proofing Validation"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Проверка эффективности защиты от ошибок"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《防错有效性验证指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Error-Proofing Validation"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Проверка эффективности защиты от ошибок"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是样件测试指导书
      else if (this.typeTableUse===11){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'样件测试',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《样件测试指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Sample Testing"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Испытание образцов"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.success(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《样件测试指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Sample Testing"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Испытание образцов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《样件测试指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Sample Testing"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Испытание образцов"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是设备点检指导书
      else if (this.typeTableUse===12){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'设备点检',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《设备点检指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Equipment Inspection"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Технический осмотр оборудования"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.success(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《设备点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Equipment Inspection"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Технический осмотр оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《设备点检指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Equipment Inspection"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Технический осмотр оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
      //做的是设备保养指导书
      else if (this.typeTableUse===13){
        //把用户选择的是编辑/添加/删除  中的哪一项传递出去
        this.editTableUse=doe
        //是插入操作
        if (doe===1){
          //是插入操作，组合数据
          this.formTableData={
            //id主键
            id:'',
            //车间名称
            workshop:'',
            //线体名称
            lineName:'',
            //工序名称
            op:'',
            //文件名称
            fileName:'',
            // 版本号
            editionNum:'',
            //编制日期
            writeDate:'',
            //执行日期
            executeDate:'',
            //文件编号
            fileNum:'',
            //编制
            writeUse:'',
            //审核
            examineUse:'',
            //批准
            ratifyUse:'',
            //会签
            countersignUse:'',
            //作业指导书
            workBook:'',
            //图片附件
            BookImage:'',
            // 视频附件
            BookVideo:'',
            // 修改记录
            editRecord:'',
            //指导书类型
            bookType:'设备保养',
          }
          if (this.languageS==='chinese'){
            this.titleUse='您正在插入一行《设备保养指导书》'
          }
          else if (this.languageS==='english'){
            this.titleUse='You are inserting a line of "Equipment Maintenance"'
          }
          else if (this.languageS==='russian'){
            this.titleUse='Вы вставляете строку "Техническое обслуживание оборудования"'
          }
          this.dialogTableHeader=true
        }
        //是编辑操作
        else if (doe===2){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书类别进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书类别进行修改";
            }
            else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction type for modification.";
            }
            else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите тип рабочую инструкцию для изменения.";
            }
            else {
              alertMessage = "请选择一个指导书类别进行修改"; // 默认中文
            }
            this.$message.success(alertMessage)
          }
          else {
            //是编辑工作，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在修改一行《设备保养指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are modifying a line of "Equipment Maintenance"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы изменяете строку "Техническое обслуживание оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
        //是删除操作
        else if (doe===3){
          if (this.workBook.length===0){
            let alertMessage= "请选择一个指导书进行修改";
            if (this.languageS === 'chinese') {
              alertMessage = "请选择一个指导书进行修改";
            } else if (this.languageS === 'english') {
              alertMessage = "Please select a work instruction for modification.";
            } else if (this.languageS === 'russian') {
              alertMessage = "Пожалуйста, выберите рабочую инструкцию для изменения.";
            } else {
              alertMessage = "请选择一个指导书进行修改"; // 默认中文
            }
            this.$message.error(alertMessage)
          }
          else {
            //是删除，涉及到一个赋值，需要深度拷贝
            this.formTableData=_.cloneDeep(this.tableDataTemp)
            if (this.languageS==='chinese'){
              this.titleUse='您正在删除一行《设备保养指导书》'
            }
            else if (this.languageS==='english'){
              this.titleUse='You are deleting a line of "Equipment Maintenance"'
            }
            else if (this.languageS==='russian'){
              this.titleUse='Вы удаляете строку "Техническое обслуживание оборудования"'
            }
            //打开弹窗
            this.dialogTableHeader=true
          }
        }
      }
    },
    //表头弹窗中的确认的弹窗，带头数据校验的
    onSubmit(doe,formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          //现在是对刀具作业指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除
          if (this.typeTableUse===1){
            //新建作业指导书
            if (doe===1){
              //现在是新建一个指导书
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              //组合作业指导书的内容
              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                                     |%|：是分割每一行中的字段的，具体为:
                                                     工作步骤|%|
                                                     注意点说明|%|
                                                     需要时间|%|
                                                     图片列表|%|
                                                     视频列表|%|
                                                     |-|分割每一行的 */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'

              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false
                }
              })
            }
            //编辑作业指导书表头
            else if (doe===2){
              //是编辑操作
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName

              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //删除作业指导书
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              }).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //组合数据
                  //删除大表中的内容
                  this.tableData.splice(this.tableDataScope.$index,1);
                  this.tableDataTemp={
                    //id主键
                    id:'',
                    //车间名称
                    workshop:'',
                    //线体名称
                    lineName:'',
                    //工序名称
                    op:'',
                    //文件名称
                    fileName:'',
                    // 版本号
                    editionNum:'',
                    //编制日期
                    writeDate:'',
                    //执行日期
                    executeDate:'',
                    //文件编号
                    fileNum:'',
                    //编制
                    writeUse:'',
                    //审核
                    examineUse:'',
                    //批准
                    ratifyUse:'',
                    //会签
                    countersignUse:'',
                    //作业指导书
                    workBook:'',
                    //图片附件
                    BookImage:'',
                    // 视频附件
                    BookVideo:'',
                    // 修改记录
                    editRecord:'',
                    //指导书类型
                    bookType:'',
                    //删除标记位
                    deleteSign:'',
                    //创建时间
                    establishTime:'',
                    //修改时间
                    UpdateTime:'',
                  }
                  this.workBook=[]
                  this.tableDataScope=null
                  this.dialogTableHeader=false
                }
              })
            }
          }
          //现在是对换型作业指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除
          else if (this.typeTableUse===2){
            //新建文件
            if (doe===1){
              //现在是新建一个指导书
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              //组合作业指导书的内容
              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                                     |%|：是分割每一行中的字段的，具体为:
                                                     工作步骤|%|
                                                     注意点说明|%|
                                                     需要时间|%|
                                                     图片列表|%|
                                                     视频列表|%|
                                                     |-|分割每一行的
             */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'

              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false
                }
              })
            }
            //编辑文件
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //删除文件
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              }).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //组合数据
                  //删除大表中的内容
                  this.tableData.splice(this.tableDataScope.$index,1);
                  this.tableDataTemp={
                    //id主键
                    id:'',
                    //车间名称
                    workshop:'',
                    //线体名称
                    lineName:'',
                    //工序名称
                    op:'',
                    //文件名称
                    fileName:'',
                    // 版本号
                    editionNum:'',
                    //编制日期
                    writeDate:'',
                    //执行日期
                    executeDate:'',
                    //文件编号
                    fileNum:'',
                    //编制
                    writeUse:'',
                    //审核
                    examineUse:'',
                    //批准
                    ratifyUse:'',
                    //会签
                    countersignUse:'',
                    //作业指导书
                    workBook:'',
                    //图片附件
                    BookImage:'',
                    // 视频附件
                    BookVideo:'',
                    // 修改记录
                    editRecord:'',
                    //指导书类型
                    bookType:'',
                    //删除标记位
                    deleteSign:'',
                    //创建时间
                    establishTime:'',
                    //修改时间
                    UpdateTime:'',
                  }
                  this.workBook=[]
                  this.tableDataScope=null
                  this.dialogTableHeader=false
                }
              })
            }
          }
          //现在是对换型作业指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===3){
            //新建文件
            if (doe===1){
              //现在是新建一个指导书
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                                     |%|：是分割每一行中的字段的，具体为:
                                                     工作步骤|%|
                                                     注意点说明|%|
                                                     需要时间|%|
                                                     图片列表|%|
                                                     视频列表|%|
                                                     |-|分割每一行的
             */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'

              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false
                }
              })
            }
            //编辑文件
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //删除文件
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是对工装点检指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===4){
            //新建文件
            if (doe===1){
              //是插入操作，在工装作业指导书中
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是对工装校准指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===10){
            //新建文件
            if (doe===1){
              //是插入操作，在工装校准指导书中
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是对工装作业指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===5){
            //新建文件
            if (doe===1){
              //是插入操作，在工装作业指导书中
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是对量检具指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===6){
            //新建文件
            if (doe===1){
              //是插入操作
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  alert("插入成功")
                  //进行数据赋值
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是报警解除指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：2.编辑；3.删除;（没有插入选项）
          else if (this.typeTableUse===7){
            if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是报警件判定指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：2.编辑；3.删除;（没有插入选项）
          else if (this.typeTableUse===8){
            if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是防错有效性验证指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===9){
            //新建文件
            if (doe===1){
              //是插入操作
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是样件测试指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===11){
            //新建文件
            if (doe===1){
              //是插入操作
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是设备点检指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===12){
            //新建文件
            if (doe===1){
              //是插入操作
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
          //现在是设备保养指导书进行添加/修改/删除,doe接收的是用户现在了操作类型：1.插入；2.编辑；3.删除;
          else if (this.typeTableUse===13){
            //新建文件
            if (doe===1){
              //是插入操作
              /*组合数据*/
              //组合相关人员的标记
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`

              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              //组合删除标记位
              this.formTableData.deleteSign=1

              /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       工作步骤|%|
                                       注意点说明|%|
                                       需要时间|%|
                                       图片列表|%|
                                       视频列表|%|
                                       |-|分割每一行的
                                       */
              this.formTableData.workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
              //向后端发送数据，进行插入操作。
              //向后端发送请求，插入数据
              this.$request.post('insertChangeModel',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(this.formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
            //是编辑操作
            else if (doe===2){
              /*组合数据*/
              //组合相关人员的标记,重新设定编审批的内容
              this.formTableData.ratifyUse=this.formTableData.ratifyUse.replace(/\/指定/g,'')
              this.formTableData.examineUse=this.formTableData.examineUse.replace(/\/指定/g,'')
              this.formTableData.countersignUse=this.formTableData.countersignUse.replace(/\/指定/g,'')
              this.formTableData.ratifyUse=this.formTableData.ratifyUse+'/指定'
              this.formTableData.examineUse=this.formTableData.examineUse+'/指定'
              this.formTableData.countersignUse=this.formTableData.countersignUse+'/指定'
              //组合两个时间的数据，编制时间，执行时间
              let date=new Date(this.formTableData.writeDate)
              let year = date.getFullYear().toString().padStart(4, '0');
              let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              let day = date.getDate().toString().padStart(2, '0');
              this.formTableData.writeDate=`${year}-${month}-${day}`

              date=new  Date(this.formTableData.executeDate)
              year = date.getFullYear().toString().padStart(4, '0');
              month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始，所以需要+1
              day = date.getDate().toString().padStart(2, '0');
              this.formTableData.executeDate=`${year}-${month}-${day}`
              //固定版本号，限定为1
              this.formTableData.editionNum=1
              //组合编制人
              this.formTableData.writeUse=this.useName
              this.$request.post('/editChangeModelTable',this.formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                } else {
                  //数据赋值
                  //进行数据赋值
                  this.tableData[this.tableDataScope.$index]=this.formTableData
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  this.dialogTableHeader=false;
                  alert("修改成功")
                }
              })
            }
            //是删除操作
            else if (doe===3){
              //是删除操作，用修改一个字段的形式实现，但是这个是根据id修改一个int类型的。
              this.$request.post('editChangeModelFieldInt',{
                id:this.tableDataScope.row.id,
                fieldName:'deleteSign',
                fieldVal:0,
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    } else {
                      //组合数据
                      //删除大表中的内容
                      this.tableData.splice(this.tableDataScope.$index,1);
                      this.tableDataTemp={
                        //id主键
                        id:'',
                        //车间名称
                        workshop:'',
                        //线体名称
                        lineName:'',
                        //工序名称
                        op:'',
                        //文件名称
                        fileName:'',
                        // 版本号
                        editionNum:'',
                        //编制日期
                        writeDate:'',
                        //执行日期
                        executeDate:'',
                        //文件编号
                        fileNum:'',
                        //编制
                        writeUse:'',
                        //审核
                        examineUse:'',
                        //批准
                        ratifyUse:'',
                        //会签
                        countersignUse:'',
                        //作业指导书
                        workBook:'',
                        //图片附件
                        BookImage:'',
                        // 视频附件
                        BookVideo:'',
                        // 修改记录
                        editRecord:'',
                        //指导书类型
                        bookType:'',
                        //删除标记位
                        deleteSign:'',
                        //创建时间
                        establishTime:'',
                        //修改时间
                        UpdateTime:'',
                      }
                      this.workBook=[]
                      this.tableDataScope=null
                      this.dialogTableHeader=false
                    }
                  })
            }
          }
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },

    //选择器的变化引起的函数
    selectChange(val, doe){
      if (val==='机加车间/Machining workshop/Машиностроительный цех'){
        this.optionLine=machiningAssembly
        this.disabledLineName=false
      }
      else if (val==='装配车间/Assembly workshop/Сборочная линия'){
        this.optionLine=workshopAssembly
        this.disabledLineName=false
      }
      console.log(doe)
    },
    //用户点击的是看作业指导书中的哪个数据，表头的上面的列表切换。
    workBookHeard(doe){
      this.workBookHeardUse=doe
      //图片、视频展示清空
      this.itemView=[]
      this.itemViewVideo=[]
      if (doe===1){
        this.workBookHeard1='#0269fa'
        this.workBookHeardColour1='white'

        this.workBookHeard2=''
        this.workBookHeardColour2=''

        this.workBookHeard3=''
        this.workBookHeardColour3=''

        this.workBookHeard4=''
        this.workBookHeardColour4=''
      }
      else if (doe===2){

        this.workBookHeard1=''
        this.workBookHeardColour1=''

        this.workBookHeard2='#0269fa'
        this.workBookHeardColour2='white'

        this.workBookHeard3=''
        this.workBookHeardColour3=''

        this.workBookHeard4=''
        this.workBookHeardColour4=''

        this.$nextTick(() => {
          if (doe === 2 && !this.chartUserBor) {
            this.initChart();
          } else if (doe !== 2 && this.chartUserBor) {
            this.chartUserBor.dispose();
            this.chartUserBor = null;
          }
        });
      }
      else if (doe===3){
        this.workBookHeard1=''
        this.workBookHeardColour1=''

        this.workBookHeard2=''
        this.workBookHeardColour2=''

        this.workBookHeard3='#0269fa'
        this.workBookHeardColour3='white'

        this.workBookHeard4=''
        this.workBookHeardColour4=''
      }
    },

    //画工时的直方图
    initChart() {
      // 组合数据
      let totalTime=0
      for (let i = 0; i < this.workBook.length; i++) {
        this.optionBor.xAxis[0].data[i] = i + 1;
        this.optionBor.series[0].data[i] = this.workBook[i].spendTime;
        totalTime += parseInt(this.workBook[i].spendTime, 10)
      }
      if (this.languageS==='chinese'){
        this.optionBor.title.text='时间分布图'
      }
      else if (this.languageS==='english'){
        this.optionBor.title.text='Time distribution chart'
      }
      else if (this.languageS==='russian'){
        this.optionBor.title.text='График распределения времени'
      }
      this.optionBor.title.subtext='总时长/Total time/Общее время：'+totalTime
      if (this.$refs.myChartBor) {
        // 初始化图表并设置选项
        this.chartUserBor = echarts.init(this.$refs.myChartBor);
        this.chartUserBor.setOption(this.optionBor);
      } else {
        console.error('DOM element not found for chart initialization');
      }
    },

    //操作人员的相关函数
    //在操作人员的列表行上单击，组合出图片来
    operatorRowClick(row){
      //组合图片
      //组合走马灯的照片
      if (row.operator_path==='' || row.operator_path===undefined || row.operator_path===null){
        this.itemView=[]
      }
      else {
        this.itemView=[]
        this.itemView.push(filepath+row.operator_path)
      }
    },
    //点击操作人员的编辑按钮，进行弹窗的函数
    operatorListEditShow(doe,scope){
      if (this.tableDataScope===null || this.tableDataScope==='' || this.tableDataScope===undefined){
        this.$message.warning("请选择作业指导书")
        return
      }
      this.operatorListDoe=doe
      this.operatorListScope=scope
      //是向下插入
      if (doe===1){
        //初始值清空
        this.operatorListForm={
          //主键
          id:'',
          //工号
          operator_id:'',
          //姓名
          operator_name:'',
          //开始时间
          star_time:'',
          //技能等级
          skill_level:'1/4',
          //指导姓名人
          mentor:'',
          //人员照片
          operator_path:'',
          //预留
          reserved1:'',
          reserved2:'',
          reserved3:'',
          reserved4:'',
          reserved5:'',
        }
        this.operatorListImageUrl=null
        //打开弹窗
        this.operatorDialog=true
      }
      //是编辑
      else if (doe===2){
        //给表单赋值
        this.operatorListForm=_.cloneDeep(scope.row)
        //组合文件信息，形成一个文件
        this.operatorListFile=null
        this.operatorListImageUrl=filepath+this.operatorListForm.operator_path
        //打开弹窗
        this.operatorDialog=true
      }
    },
    //点击操作人员的编辑弹窗，点击确定按钮
    operatorListEdit(){
      //数据校验
      if (this.operatorListForm.operator_name==='' || this.operatorListForm.operator_name===null || this.operatorListForm.operator_name===undefined){
        this.$message.error('操作者姓名没有填写')
        return
      }
      if (this.operatorListForm.mentor==='' || this.operatorListForm.mentor===null || this.operatorListForm.mentor===undefined){
        this.$message.error('指导者姓名没有填写')
        return
      }
      if (this.operatorListForm.star_time==='' || this.operatorListForm.star_time===null || this.operatorListForm.star_time===undefined){
        this.$message.error('开始时间没有填写')
        return
      }
      //是向下插入
      if (this.operatorListDoe===1){
        //处理文件，这是需要修改文件的
        if (this.operatorListFile!==null){
          //给图片赋值一个唯一的名字
          let fileName=this.generateUniqueId()+'.'+this.operatorListFile.name.split('.')[this.operatorListFile.name.split('.').length-1]
          //给图片文件的名字复制
          this.operatorListFile.name=fileName
          //给表单的图片路径名称赋值
          this.operatorListForm.operator_path=fileName
          //组合数据
          let operatorListTemp=_.cloneDeep(this.operatorList)
          operatorListTemp.push(this.operatorListForm)
          let str=''
          for (let i = 0; i < operatorListTemp.length; i++) {
            operatorListTemp[i].id=i+1
            //组合数据
            let temp= Object.values(operatorListTemp[i]).join('|%|')
            if (i===0){
              str=temp
            }
            else {
              str=str+'|-|'+temp
            }
          }
          //向后端发送，需要用传输文件的接口
          const formData = new FormData();
          formData.append('file', this.operatorListFile.raw)
          formData.append('fieldName','operator')
          formData.append('fieldVal',str)
          formData.append('fileName',this.operatorListFile.name)
          formData.append('id',this.tableDataScope.row.id)
          //状态码，0：代表新增；1:代表删除老的，加入新的；即新的替换老的；3：删除老的；
          formData.append('type',0)
          //老文件的文件名称
          formData.append('oldFileName','')
          this.$requestFile.post('/editOperatorChangeModelNew',formData).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            else {
              //修改大表数据
              this.tableData[this.tableDataScope.$index].operator=str
              //修改scope数据
              this.tableDataScope.row.operator= str
              //修改operatorList数据
              this.operatorList.push(this.operatorListForm)
              //关闭弹窗
              this.operatorDialog=false
            }
          })
        }
        else {
          //组合数据，用不是文件的接口修改数据，不需要修改图片
          //组合数据
          let operatorListTemp=_.cloneDeep(this.operatorList)
          operatorListTemp.push(this.operatorListForm)
          let str=''
          for (let i = 0; i < operatorListTemp.length; i++) {
            operatorListTemp[i].id=i+1
            //组合数据
            let temp= Object.values(operatorListTemp[i]).join('|%|')
            if (i===0){
              str=temp
            }
            else {
              str=str+'|-|'+temp
            }
          }
          //向后端发送请求，修改一个字段
          this.editOneFiledById(this.tableDataScope.row.id,'operator',str).then(()=>{
            //修改数据
            this.tableData[this.tableDataScope.$index].operator=str
            //分割操作人员
            //对操作人员进行分割
            this.operatorList=[]
            if (this.tableData[this.tableDataScope.$index].operator==='' || this.tableData[this.tableDataScope.$index].operator===null || this.tableData[this.tableDataScope.$index].operator===undefined){
              this.operatorList=[]
            }
            else {
              let operatorTemp=this.tableData[this.tableDataScope.$index].operator.split('|-|')
              for (let i = 0; i < operatorTemp.length; i++) {
                //进行第二轮循环
                let itemTemp=operatorTemp[i].split('|%|')
                let item={
                  //主键
                  id:itemTemp[0],
                  //工号
                  operator_id:itemTemp[1],
                  //姓名
                  operator_name:itemTemp[2],
                  //开始时间
                  star_time:itemTemp[3],
                  //技能等级
                  skill_level:itemTemp[4],
                  //指导人
                  mentor:itemTemp[5],
                  //员工图片路径
                  operator_path:itemTemp[6],
                  //预留
                  reserved1:itemTemp[7],
                  reserved2:itemTemp[8],
                  reserved3:itemTemp[9],
                  reserved4:itemTemp[10],
                  reserved5:itemTemp[11],
                }
                this.operatorList.push(item)
              }
              this.operatorDialog=false
            }
          })
        }
      }
      //是编辑
      else if (this.operatorListDoe===2){
        //如果文件没有修改
        if (this.operatorListImageUrl.includes(this.operatorListScope.row.operator_path)){
          //只是修改文本，直接组合，去后端进行修改
          //组合数据，用不是文件的接口修改数据
          //组合数据
          let operatorListTemp=_.cloneDeep(this.operatorList)
          operatorListTemp.splice(this.operatorListScope.$index,1,this.operatorListForm)
          let str=''
          for (let i = 0; i < operatorListTemp.length; i++) {
            operatorListTemp[i].id=i+1
            //组合数据
            let temp= Object.values(operatorListTemp[i]).join('|%|')
            if (i===0){
              str=temp
            }
            else {
              str=str+'|-|'+temp
            }
          }
          //向后端发送请求，修改一个字段
          this.editOneFiledById(this.tableDataScope.row.id,'operator',str).then(()=>{
            //修改数据
            this.tableData[this.tableDataScope.$index].operator=str
            //分割操作人员
            //对操作人员进行分割
            this.operatorList=[]
            if (this.tableData[this.tableDataScope.$index].operator==='' || this.tableData[this.tableDataScope.$index].operator===null || this.tableData[this.tableDataScope.$index].operator===undefined){
              this.operatorList=[]
            }
            else {
              let operatorTemp=this.tableData[this.tableDataScope.$index].operator.split('|-|')
              for (let i = 0; i < operatorTemp.length; i++) {
                //进行第二轮循环
                let itemTemp=operatorTemp[i].split('|%|')
                let item={
                  //主键
                  id:itemTemp[0],
                  //工号
                  operator_id:itemTemp[1],
                  //姓名
                  operator_name:itemTemp[2],
                  //开始时间
                  star_time:itemTemp[3],
                  //技能等级
                  skill_level:itemTemp[4],
                  //指导人
                  mentor:itemTemp[5],
                  //员工图片路径
                  operator_path:itemTemp[6],
                  //预留
                  reserved1:itemTemp[7],
                  reserved2:itemTemp[8],
                  reserved3:itemTemp[9],
                  reserved4:itemTemp[10],
                  reserved5:itemTemp[11],
                }
                this.operatorList.push(item)
              }
              this.operatorDialog=false
            }
          })
        }
        //文件修改了
        else {
          //图片文件修改了，向后端走端口，类型是1；
          //给图片赋值一个唯一的名字
          let fileName=this.generateUniqueId()+'.'+this.operatorListFile.name.split('.')[this.operatorListFile.name.split('.').length-1]
          //组合数据
          let operatorListTemp=_.cloneDeep(this.operatorList)
          //给图片文件的名字赋值给文件
          this.operatorListFile.name=fileName
          //给表单的图片路径名称赋值（保存原有的Form中还是老的图片名称）
          let oldFileName=this.operatorListForm.operator_path
          this.operatorListForm.operator_path=fileName
          operatorListTemp.splice(this.operatorListScope.$index,1,this.operatorListForm)
          let str=''
          for (let i = 0; i < operatorListTemp.length; i++) {
            operatorListTemp[i].id=i+1
            //组合数据
            let temp= Object.values(operatorListTemp[i]).join('|%|')
            if (i===0){
              str=temp
            }
            else {
              str=str+'|-|'+temp
            }
          }
          //向后端发送，需要用传输文件的接口
          const formData = new FormData();
          formData.append('file', this.operatorListFile.raw)
          formData.append('fieldName','operator')
          formData.append('fieldVal',str)
          formData.append('fileName',this.operatorListFile.name)
          formData.append('id',this.tableDataScope.row.id)
          //状态码，0：代表新增；1:代表删除老的，加入新的；即新的替换老的；3：删除老的；
          formData.append('type',1)
          //老文件的文件名称
          formData.append('oldFileName',oldFileName)
          this.$requestFile.post('/editOperatorChangeModelNew',formData).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            else {
              //修改大表数据
              this.tableData[this.tableDataScope.$index].operator=str
              //修改scope数据
              this.tableDataScope.row.operator= str
              //修改operatorList数据
              this.operatorList.splice(this.operatorListScope.$index,1,this.operatorListForm)
              //修改图片列表
              this.itemView=[]
              this.itemView.push(filepath+this.operatorListForm.operator_path)
              this.operatorDialog=false
            }
          })
        }
      }
    },
    //上传头像用到的函数
    handleAvatarSuccess(file) {
      this.operatorListImageUrl = URL.createObjectURL(file.raw);
      this.operatorListFile=file
    },
    beforeAvatarUpload(file) {
      // 允许的MIME类型列表
      const allowedTypes = ['image/jpeg', 'image/png', 'image/jpg'];

      // 修正后的类型检查（使用数组includes）
      const isAllowedType = allowedTypes.includes(file.type);

      // 大小检查保持不变
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isAllowedType) {
        this.$message.error('只能上传 JPG/PNG 格式的图片!');
      }

      return isAllowedType && isLt2M;
    },

    //辅助函数：根据ID，修改给一个字段
    async editOneFiledById(id,filedName,filedVal){
      return  this.$request.post('/editOneFiledByIdChangeModelNew',{
        id:id,
        filedName:filedName,
        filedVal:filedVal
      }).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
              this.$message('保存成功')
              return result.data
            }
      })
    },
    //辅助函数：生成唯一标识码的函数（利用时间戳和随机数）
    generateUniqueId() {
      return Date.now().toString() + Math.random().toString(36).slice(2, 11)
    },

    //上传文件的函数(上传图片）
    saveFileAnnex(file, fileList){
      this.loading=false
      console.log(fileList)
      if (this.editBookType===4){
        //是对图片的操作
        const formData = new FormData()
        //1.新生成一个文件名称,并且把文件名称的后缀添加上
        let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
        //2.记录一个新的图片名称
        let pictureName=''
        //把文件数据放进去
        file.name=fileName
        //把图片加入到自己的图片列表中，好像没有用
        this.PictureList.push(file)
        formData.append('file', file.raw)
        //把原来的图片字符串放进去，作为修改用
        //把数据整合到作业指导书的内容中
        //先判断原来的数据是否有图片
        if (this.workBookScope.row.pictureList.includes('undefined')){
          //原来没有图片，需要现在全新生成
          pictureName=fileName+'|*|'
        }
        else {
          //原来已经有图片了
          pictureName=this.workBookScope.row.pictureList+fileName+'|*|'
        }
        //重新组合作业指导书的文本内容。
        //组合数据
        //向总数据中进行组合
        let temp=_.cloneDeep(this.workBook)
        //把新的图片字符串赋值
        temp[this.workBookScope.$index].pictureList=pictureName
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          let oneTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+'|-|'
          strTemp=strTemp+oneTemp
        }
        formData.append('id',this.tableDataScope.row.id)
        formData.append('fieldName','workBook')
        formData.append('fieldVal',strTemp)
        formData.append('fileName',fileName)
        this.loading=true
        //保存文件，需要返回修改后的图片地址保存数据，并且进行赋值
        this.$requestFile.post('/editChangeModelPictureNew',formData).
        then(result=>{
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }else {
            if (result.data===null){
              alert("程序出现异常，请联系管理员")
            }else {
              this.loading=false
              //修改主表中的数据和记录的保存数据
              this.tableData[this.tableDataScope.$index].workBook=result.data
              this.tableDataScope.row.workBook=result.data
              //重新组合作业指导书的内
              this.workBook[this.workBookScope.$index].pictureList=pictureName
              //修改走马灯的图片数组
              //组合照片的数据
              this.PictureList=[]//组合文件上传窗口的图片列表，先清空
              this.itemView=[]//修改走马灯的图片数组，先清空
              const temp1=pictureName.split('|*|')
              for (let i = 0; i < temp1.length-1; i++) {
                let temp2 = {
                  name: temp1[i],
                  percentage: 0,
                  raw: File,
                  size: 0,
                  status: null,
                  uid: null,
                  url: filepath + temp1[i]
                }
                this.PictureList.push(temp2)
                this.itemView.push(filepath+temp1[i])
              }
            }
          }
        })
      }
      else if (this.editBookType===5){
        //是视频的操作
        //新建一个文件变量
        const formData = new FormData()
        //1.新生成一个文件名称,并且把文件名称的后缀添加上
        let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
        //2.记录一个新的图片名称
        let pictureName=''
        //把文件数据放进去
        file.name=fileName
        //把图片加入到自己的图片列表中，好像没有用
        this.videoList.push(file)
        formData.append('file', file.raw)
        //把原来的图片字符串放进去，作为修改用
        //把数据整合到作业指导书的内容中
        //先判断原来的数据是否有图片
        if (this.workBookScope.row.videoList.includes('undefined')){
          //原来没有图片，需要现在全新生成
          pictureName=fileName+'|*|'
        }
        else {
          //原来已经有视频了
          pictureName=this.workBookScope.row.videoList+fileName+'|*|'
        }
        //重新组合作业指导书的文本内容。
        //组合数据
        //向总数据中进行组合
        let temp=_.cloneDeep(this.workBook)
        //把新的图片字符串赋值
        temp[this.workBookScope.$index].videoList=pictureName
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          let oneTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+'|-|'
          strTemp=strTemp+oneTemp
        }
        formData.append('id',this.tableDataScope.row.id)
        formData.append('fieldName','workBook')
        formData.append('fieldVal',strTemp)
        formData.append('fileName',fileName)

        //保存文件，需要返回修改后的图片地址保存数据，并且进行赋值
        this.$requestFile.post('/editChangeModelPictureNew',formData).
        then(result=>{
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }else {
            if (result.data===null){
              alert("程序出现异常，请联系管理员")
            }else {
              //修改主表中的数据和记录的保存数据
              this.tableData[this.tableDataScope.$index].workBook=result.data
              this.tableDataScope.row.workBook=result.data
              //重新组合作业指导书的内
              this.workBook[this.workBookScope.$index].videoList=pictureName

              //修改走马灯的视频数组
              //组合视频的数据
              this.videoList=[]//组合文件上传窗口的图片列表，先清空
              this.itemViewVideo=[]//修改走马灯的图片数组，先清空
              const temp1=pictureName.split('|*|')
              for (let i = 0; i < temp1.length-1; i++) {
                let temp2 = {
                  name: temp1[i],
                  percentage: 0,
                  raw: File,
                  size: 0,
                  status: null,
                  uid: null,
                  url: filepath + temp1[i]
                }
                this.videoList.push(temp2)
                this.itemViewVideo.push(filepath+temp1[i])
              }
            }
          }
        })
      }
    },
    //点击查看照片的函数
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogPictureAnnex = true;
    },
    //点击图片下载按钮
    handleDownload(file) {
      //向后端发送请求，下载文件
      this.$request.get('/changeModelDownload?fileName=' + encodeURIComponent(file.name)).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else {
          let base64Data = 'data:application/octet-stream;base64,' + result.data//
          // 创建一个Blob对象
          let blob = this.dataURItoBlob(base64Data);
          // 触发下载
          this.downloadBlob(blob, file.name);
        }
      }).catch(error => {
        // 处理请求错误
        console.error("请求出错", error);
      })
    },
    //照片移除的函数
    handleRemove(file) {
        //操作的是图片
        if (this.editBookType===4){
          //对图片列表中的信息进行整合
          const index = this.PictureList.findIndex(item => item.name === file.name);
          this.PictureList.splice(index,1)
          //重新组合作业指导书的文本内容。
          //组合数据
          //向总数据中进行组合
          let temp=_.cloneDeep(this.workBook)
          //把新的图片字符串赋值
          temp[this.workBookScope.$index].pictureList=this.workBookScope.row.pictureList.replace(file.name+'|*|','')
          //判断一下，是不是删除后为空了，如果是，就设置为undefined
          if (temp[this.workBookScope.$index].pictureList===''){
            temp[this.workBookScope.$index].pictureList='undefined|*|'
          }
          //组合成为作业指导书的文本数据，用的方法是，先把每一条的数据组合起来。
          let strTemp=''//组合的临时变量,用在向后端保存数据的变量
          for (let i = 0; i < temp.length; i++) {
            //组合自己每一条的变量
            /*组合作业指导书的内容   注：|*|：是分割语言的；
                                 |%|：是分割每一行中的字段的，具体为:
                                 work:工作步骤|%|
                                 problem:注意点说明|%|
                                 spendTime:需要时间|%|
                                 pictureList:图片列表|%|
                                 videoList:视频列表|%|
                                 |-|分割每一行的
                                 */
            let itemStr=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime
                +'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'
            strTemp=strTemp+itemStr+'|-|'
          }
          //向后端发送请求
          this.$request.post('/changeModeNewPictureRemove',{
            id:this.tableDataScope.row.id,
            fieldName:'workBook',
            filedVal:strTemp,
            pictureName:file.name
          }).
          then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            else {
              if (result.data==='删除文件时出错'){
                alert("删除文件出错，请联系管理员")
              }else {
                //修改列表中的数据
                //修改主表中的数据和记录的保存数据
                this.tableData[this.tableDataScope.$index].workBook=result.data
                this.tableDataScope.row.workBook=result.data
                //组合走马灯的照片
                  this.itemView=[]
                if (temp[this.workBookScope.$index].pictureList.includes('undefined')){
                  this.itemView=[]
                }
                else {
                  this.itemView=[]
                  let tempView=temp[this.workBookScope.$index].pictureList.split('|*|')
                  for (let i = 0; i < tempView.length-1; i++) {
                    this.itemView.push(filepath+tempView[i])
                  }
                }
              }
            }
          })
        }
        //操作的是视频
        if (this.editBookType===5){
          //对图片列表中的信息进行整合
          const index = this.videoList.findIndex(item => item.name === file.name);
          this.videoList.splice(index,1)
          //重新组合作业指导书的文本内容。
          //组合数据
          //向总数据中进行组合
          let temp=_.cloneDeep(this.workBook)
          //把新的视频字符串赋值
          temp[this.workBookScope.$index].videoList=this.workBookScope.row.videoList.replace(file.name+'|*|','')
          //判断一下，是不是删除后为空了，如果是，就设置为undefined
          if (temp[this.workBookScope.$index].videoList===''){
            temp[this.workBookScope.$index].videoList='undefined|*|'
          }
          //组合成为作业指导书的文本数据，用的方法是，先把每一条的数据组合起来。
          let strTemp=''//组合的临时变量,用在向后端保存数据的变量
          for (let i = 0; i < temp.length; i++) {
            //组合自己每一条的变量
            /*组合作业指导书的内容   注：|*|：是分割语言的；
                                 |%|：是分割每一行中的字段的，具体为:
                                 work:工作步骤|%|
                                 problem:注意点说明|%|
                                 spendTime:需要时间|%|
                                 pictureList:图片列表|%|
                                 videoList:视频列表|%|
                                 |-|分割每一行的
                                 */
            let itemStr=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime +'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'
            strTemp=strTemp+itemStr+'|-|'
          }
          // 向后端发送请求
          this.$request.post('/changeModeNewPictureRemove',{
            id:this.tableDataScope.row.id,
            fieldName:'workBook',
            filedVal:strTemp,
            pictureName:file.name
          }).
          then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            else {
              if (result.data==='删除文件时出错'){
                alert("删除文件出错，请联系管理员")
              }else {
                //修改列表中的数据
                //修改主表中的数据和记录的保存数据
                this.tableData[this.tableDataScope.$index].workBook=result.data
                this.tableDataScope.row.workBook=result.data
                //组合走马灯的视频
                this.itemViewVideo=[]
                if (temp[this.workBookScope.$index].videoList.includes('undefined')){
                  this.itemViewVideo=[]
                }
                else {
                  this.itemViewVideo=[]
                  let tempView=temp[this.workBookScope.$index].videoList.split('|*|')
                  for (let i = 0; i < tempView.length-1; i++) {
                    this.itemViewVideo.push(filepath+tempView[i])
                  }
                }
              }
            }
          })
        }
    },
    //单击走马灯上的照片，图片放大方法
    handleImageClick(item){
      this.dialogImageUrl=item
      this.dialogPictureAnnex=true
    },
    // 辅助函数：将Base64编码的字符串转换为Blob对象
    dataURItoBlob(dataURI) {
      // 分离出头部信息,得到数据部分
      let byteString;
      if (dataURI.split(',')[0].indexOf('base64') >= 0)
        byteString = atob(dataURI.split(',')[1]);
      else
        byteString = unescape(dataURI.split(',')[1]);

      // 写入数组缓冲区
      let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
      let ia = new Uint8Array(byteString.length);
      for (let i = 0; i < byteString.length; i++) {
        ia[i] = byteString.charCodeAt(i);
      }
      return new Blob([ia], {type:mimeString});
    },
    // 辅助函数：触发Blob对象的下载
    downloadBlob(blob, fileName) {
      let link = document.createElement('a');
      link.href = window.URL.createObjectURL(blob);
      link.download = fileName;
      link.click();
      window.URL.revokeObjectURL(link.href);
    },

    //单击某一个数据表的时候，做出的反应（现在函数用在了主表上）
    tableDataClick(doe,scope){
      if (doe===1){
        //默认进了先看要领书/指导书
        this.workBookHeardUse=1
        //图片、视频展示清空
        this.itemView=[]
        this.itemViewVideo=[]
        this.workBookHeard1='#0269fa'
        this.workBookHeardColour1='white'

        this.workBookHeard2=''
        this.workBookHeardColour2=''

        this.workBookHeard3=''
        this.workBookHeardColour3=''

        //现在是主表上的点击
        //把单击的单元格范围数据发送出去
        this.tableDataScope=scope
        //把数据赋值给临时的数据
        this.tableDataTemp=_.cloneDeep(scope.row)
        //组合作业指导书的内容
        //把数据进行分割
        const temp=this.tableDataTemp.workBook.split('|-|')
        //给作业指导书的步骤组合
        this.workBook=[]
        for (let i = 0; i < temp.length-1; i++) {
          const tempData=temp[i].split('|%|')
          const tempWorkBook={
            id:i,
            work:tempData[0],//工作步骤
            problem:tempData[1],//关注点
            spendTime:tempData[2],//需要时间
            pictureList:tempData[3],//图片列表
            videoList:tempData[4],//视频列表
            measurementTechnique:tempData[5],//评价测量技术
            cycle:tempData[6]//周期
          }
          this.workBook.push(tempWorkBook)
        }
        //对修改记录进行组合
        const editRecordTemp=this.tableDataScope.row.editRecord.split(';')
        //给修改数据赋值：
        this.editUser=editRecordTemp[1]
        this.editData=editRecordTemp[0]

        //对操作人员进行分割
        this.operatorList=[]
        if (this.tableData[this.tableDataScope.$index].operator==='' || this.tableData[this.tableDataScope.$index].operator===null || this.tableData[this.tableDataScope.$index].operator===undefined){
          this.operatorList=[]
        }
        else {
          let operatorTemp=this.tableData[this.tableDataScope.$index].operator.split('|-|')
          for (let i = 0; i < operatorTemp.length; i++) {
            //进行第二轮循环
            let itemTemp=operatorTemp[i].split('|%|')
            let item={
              //主键
              id:itemTemp[0],
              //工号
              operator_id:itemTemp[1],
              //姓名
              operator_name:itemTemp[2],
              //开始时间
              star_time:itemTemp[3],
              //技能等级
              skill_level:itemTemp[4],
              //指导人
              mentor:itemTemp[5],
              //员工图片路径
              operator_path:itemTemp[6],
              //预留
              reserved1:itemTemp[7],
              reserved2:itemTemp[8],
              reserved3:itemTemp[9],
              reserved4:itemTemp[10],
              reserved5:itemTemp[11],
            }
            this.operatorList.push(item)
          }
        }
        //关闭抽屉
        this.drawer=false
      }
    },
    //单击作业指导书上的行的反应
    workBookRowClick(row){
      this.workBookRow=row
      //清空数据
      this.itemViewVideo=[]
      this.itemView=[]
      //组合走马灯图片
      if (row.pictureList.includes('undefined')){
        this.itemView=[]
      }
      else {
        let pictureTemp=row.pictureList.split('|*|')
        this.itemView=[]
        for (let i = 0; i < pictureTemp.length-1; i++) {
          let temp=filepath+pictureTemp[i]
          this.itemView.push(temp)
        }
      }
      //组合走马灯的视频
      if (row.videoList.includes('undefined')){
        this.itemViewVideo=[]
      }
      else {
        let pictureTemp=row.videoList.split('|*|')
        this.itemViewVideo=[]
        for (let i = 0; i < pictureTemp.length-1; i++) {
          let temp=filepath+pictureTemp[i]
          this.itemViewVideo.push(temp)
        }
      }
    },
    //用户点击作业指导书中的行，改变背景颜色
    workBookRowClassName(row){
      // 如果当前行是currentRow，则返回特定的样式
      if (this.workBookRow && this.workBookRow === row.row) {
        return {
          backgroundColor: 'lightgray', // 灰色背景
          color: 'blue' // 蓝色文字
        };
      }
      return {}; // 否则不应用任何样式
    },

    //用户开始进行文件审批的函数
    documentReview(doe,val){
      //是审核，用户开始点击审核了
      if (doe===1){
        if (val.includes(this.useName)){
          if (val.includes("指定")){
            //完成后台数据修改，本次修改只是修改本字段，将“指定”修改为“已审批”
            alert("已审批")
          }
        }
        else {
          alert("您不是审核人，请核对")
        }
      }
    },

    //自动添加《报警解除作业指导书》，是查询过PLC的报警信息，发现现在没有这一个报警的作业指导书做出的弹窗，点击确定按钮的反应
    exceptionAdd(){
      //组合数据，并且写入作业指导书中
      for (let i = 0; i < this.plcAlarmSettingData.length; i++) {
        //组合数据
        let workshop=''
        if (this.plcAlarmSettingData[i].workShop==='Engine Assembly Workshop'){
          workshop='装配车间/Assembly workshop/Сборочная линия'
        }
        let lineName=''
        if (this.plcAlarmSettingData[i].workArea==='InternalLine' || this.plcAlarmSettingData[i].workArea==='InternalLine'){
          lineName='总成线/Assembly line/сборочная линия'
        }
        else if (this.plcAlarmSettingData[i].workArea==='GGLine'){
          lineName='缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
        }
        //组合时间
        let date=this.getCurrentDate()
        //组合作业指导书的内容
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                               |%|：是分割每一行中的字段的，具体为:
                                               工作步骤|%|
                                               注意点说明|%|
                                               需要时间|%|
                                               图片列表|%|
                                               视频列表|%|
                                               |-|分割每一行的*/
        let workBook='请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|'
        let formTableData={
          //id主键
          id:'',
          //车间名称
          workshop:workshop,
          //线体名称
          lineName:lineName,
          //工序名称
          op:this.plcAlarmSettingData[i].stationID,
          //文件名称
          fileName:this.plcAlarmSettingData[i].alarmInformationChinese+'|*|'+this.plcAlarmSettingData[i].alarmInformationEnglish+'|*|'+this.plcAlarmSettingData[i].alarmInformationRussian,
          // 版本号
          editionNum:1,
          //编制日期
          writeDate:date,
          //执行日期
          executeDate:date,
          //文件编号
          fileNum:'',
          //编制
          writeUse:this.useName,
          //审核
          examineUse:'',
          //批准
          ratifyUse:'',
          //会签
          countersignUse:'',
          //作业指导书
          workBook:workBook,
          //图片附件
          BookImage:this.plcAlarmSettingData[i].id.toString(),
          // 视频附件
          BookVideo:'',
          // 修改记录
          editRecord:'',
          //指导书类型
          bookType:'报警解除',
        }
        //向后端发送请求，插入数据
        this.$request.post('insertChangeModel',formTableData).then(result=>{
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('插入成功')
          }
        })
        //重新查询本工位的报警解除作业指导书内容
        //查询数据
        this.inquiryType('报警解除').then(data=> {
          this.tableData = data
          this.drawer=true
        })
      }
    },
    //辅助函数：调取报警解除的基础信息表。
    async queryPlcAlarmSetting() {
      //当点击名称为alarmList（网页中名字为报警类型清单）时，发送post至后端，并处理接收到的结果
      const result = await this.$request.post('/selectAllPlcAlarmSettingWorkException')
      if (result.code === 401) {
        // 未登录，跳转到登录页面并提示
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
        throw new Error("未登录"); // 抛出错误，表明操作失败
      }
      // 成功，直接返回 result.data
      return result.data;
    },

    //辅助函数：返回当期日期yyyy-MM-dd
    getCurrentDate() {
      const date = new Date();
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以要加1
      const day = String(date.getDate()).padStart(2, '0');
      return `${year}-${month}-${day}`;
    },

    //刷新工装点检、校准指导书抽屉
    refreshProject(){
      if (this.typeTableUse===4){
        this.queryDrawingNumberList().then(data=>{
          for (let i = 0; i < data.length; i++) {
            let fileName=data[i].drawing_number + "-" + data[i].fixture_name + "|*|" + data[i].fixture_name_english + "|*|" + data[i].fixture_name_russian
            let index=this.tableData.findIndex(item=>item.fileName===fileName)
            if (index===-1){
              //需要插入一行新的作业指导书
              let formTableData={
                //id主键
                id:'',
                //删除标记位
                deleteSign:1,
                //车间名称
                workshop:data[i].department,
                //线体名称
                lineName:'无/No/Нет',
                //工序名称
                op:'无/No/Нет',
                //文件名称
                fileName:fileName,
                // 版本号
                editionNum:1,
                //编制日期
                writeDate:this.getCurrentDateFormatted(),
                //执行日期
                executeDate:this.getCurrentDateFormatted(),
                //文件编号
                fileNum:'',
                //编制
                writeUse:this.useName,
                //审核
                examineUse:'',
                //批准
                ratifyUse:'',
                //会签
                countersignUse:'',
                //作业指导书
                workBook:'请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|',
                //图片附件
                BookImage:'',
                // 视频附件
                BookVideo:'',
                // 修改记录
                editRecord:'',
                //指导书类型
                bookType:'工装点检',
              }
              this.$request.post('insertChangeModel',formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
          }
        })
      }
      else if (this.typeTableUse===10){
        this.queryDrawingNumberList().then(data=>{
          for (let i = 0; i < data.length; i++) {
            let fileName=data[i].drawing_number + "-" + data[i].fixture_name + "|*|" + data[i].fixture_name_english + "|*|" + data[i].fixture_name_russian
            let index=this.tableData.findIndex(item=>item.fileName===fileName)
            if (index===-1){
              //需要插入一行新的作业指导书
              let formTableData={
                //id主键
                id:'',
                //删除标记位
                deleteSign:1,
                //车间名称
                workshop:data[i].department,
                //线体名称
                lineName:'无/No/Нет',
                //工序名称
                op:'无/No/Нет',
                //文件名称
                fileName:fileName,
                // 版本号
                editionNum:1,
                //编制日期
                writeDate:this.getCurrentDateFormatted(),
                //执行日期
                executeDate:this.getCurrentDateFormatted(),
                //文件编号
                fileNum:'',
                //编制
                writeUse:this.useName,
                //审核
                examineUse:'',
                //批准
                ratifyUse:'',
                //会签
                countersignUse:'',
                //作业指导书
                workBook:'请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|请编辑内容|*|Please edit the content|*|Пожалуйста, отредактируйте содержимое|%|0|%|undefined|*||%|undefined|*||%||-|',
                //图片附件
                BookImage:'',
                // 视频附件
                BookVideo:'',
                // 修改记录
                editRecord:'',
                //指导书类型
                bookType:'工装校准',
              }
              this.$request.post('insertChangeModel',formTableData).then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  this.$message.error('您未登录，请登录')
                } else {
                  this.$message.success('插入成功')
                  //进行数据赋值，重新查找数据
                  this.tableData.push(formTableData)
                  this.tableDataTemp=_.cloneDeep(this.formTableData)
                  //工作步骤进行赋值
                  let tempWorkBook=this.formTableData.workBook.split('|-|')
                  this.workBook=tempWorkBook[0].split('|%|')
                  this.dialogTableHeader=false
                }
              })
            }
          }
        })
      }
    },

    //查询所有不重复的工装图纸编号  走本来的controller层，再调工装技术条件的service层
    async queryDrawingNumberList(){
      return this.$request.post('/queryDrawingNumberChangeModelNew').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          return result.data
        }
      })
    },
  },
  mounted() {
    this.inquiry()
    //数据清理
    this.workBook=[]
    this.itemView=[]
    this.itemViewVideo=[]
    this.operatorList=[]
    //默认显示图片
    this.switchVideo(1)
  }
}
</script>

<style scoped>
/* 主体左侧的工作步骤栏用到的数据包围的div的样式*/

.el-footer {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  border-left-color: white;
  border-top: white;
}

.el-aside {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  height: 89vh;
}

.el-main {
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-left-color: white;
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.headMain{
  color: #ffffff; /* 设置字体颜色为红色 */
  font-size: 18px;
}
.center-text {
  /* 使用 margin-left 和 margin-right auto 来实现居中效果 */
  margin-left: auto;
  margin-right: auto;
  /* 注意：如果 header 内只有这两个元素，你可能不需要 margin-right: auto */
}
.el-button {
  white-space: normal !important;
  word-break: break-word !important;
}

/*自定义样式*/

.avatar-uploader :deep(.el-upload) {
  border: 1px dashed #d9d9d9 !important; /* 强制边框样式 */
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 200px;  /* 强制保证容器尺寸 */
  height: 200px;
}

/* 增强悬停效果 */
.avatar-uploader :deep(.el-upload:hover) {
  border-color: #409EFF !important;
}

/* 防止全局蓝色边框继承 */
.avatar-uploader :deep(.el-upload) {
  border-top-color: #d9d9d9 !important;
  border-left-color: #d9d9d9 !important;
}

/* 保持其他原有样式 */
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 200px;
  height: 200px;
  line-height: 200px;
  text-align: center;
}
.avatar {
  width: 200px;
  height: 200px;
  display: block;
}

/* 穿透Element UI组件样式 */
::v-deep .russian-input .el-textarea__inner {
  /* 推荐俄语字体组合（西里尔字母优化） */
  font-family: "Segoe UI", "Roboto", "Arial", sans-serif;

  /* 行高优化（俄语推荐1.3-1.5） */
  line-height: 1.4 !important;

  /* 字体大小调整（可选） */
  font-size: 14px;

  /* 字母间距微调 */
  letter-spacing: 0.02em;
}

</style>